Package org.apache.fop.layoutmgr
Class WhitespaceManagementPenalty
- java.lang.Object
-
- org.apache.fop.layoutmgr.ListElement
-
- org.apache.fop.layoutmgr.KnuthElement
-
- org.apache.fop.layoutmgr.KnuthPenalty
-
- org.apache.fop.layoutmgr.WhitespaceManagementPenalty
-
public class WhitespaceManagementPenalty extends KnuthPenalty
A special penalty used to specify content having multiple variants. At most only one variant will be inserted into the final document. If none of the variants fit into the remaining space on the current page, the dynamic content will be completely ignored.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WhitespaceManagementPenalty.Variant
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<WhitespaceManagementPenalty.Variant>
variantList
private MultiSwitchLayoutManager.WhitespaceManagementPosition
whitespaceManagementPosition
-
Fields inherited from class org.apache.fop.layoutmgr.KnuthPenalty
DUMMY_ZERO_PENALTY, FLAGGED_PENALTY
-
Fields inherited from class org.apache.fop.layoutmgr.KnuthElement
INFINITE
-
-
Constructor Summary
Constructors Constructor Description WhitespaceManagementPenalty(MultiSwitchLayoutManager.WhitespaceManagementPosition pos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVariant(WhitespaceManagementPenalty.Variant variant)
java.util.List<WhitespaceManagementPenalty.Variant>
getVariants()
boolean
hasActiveVariant()
void
setActiveVariant(WhitespaceManagementPenalty.Variant bestVariant)
java.lang.String
toString()
-
Methods inherited from class org.apache.fop.layoutmgr.KnuthPenalty
getBreakClass, getPenalty, isForcedBreak, isPenalty, isPenaltyFlagged, setPenalty, valueOf
-
Methods inherited from class org.apache.fop.layoutmgr.KnuthElement
getShrink, getStretch, getWidth, isAuxiliary, isUnresolvedElement
-
Methods inherited from class org.apache.fop.layoutmgr.ListElement
getLayoutManager, getPosition, isBox, isGlue, setPosition
-
-
-
-
Field Detail
-
whitespaceManagementPosition
private final MultiSwitchLayoutManager.WhitespaceManagementPosition whitespaceManagementPosition
-
variantList
private final java.util.List<WhitespaceManagementPenalty.Variant> variantList
-
-
Constructor Detail
-
WhitespaceManagementPenalty
public WhitespaceManagementPenalty(MultiSwitchLayoutManager.WhitespaceManagementPosition pos)
-
-
Method Detail
-
addVariant
public void addVariant(WhitespaceManagementPenalty.Variant variant)
-
setActiveVariant
public void setActiveVariant(WhitespaceManagementPenalty.Variant bestVariant)
-
hasActiveVariant
public boolean hasActiveVariant()
-
getVariants
public java.util.List<WhitespaceManagementPenalty.Variant> getVariants()
-
toString
public java.lang.String toString()
Description copied from class:KnuthPenalty
- Overrides:
toString
in classKnuthPenalty
-
-