Class Keep
java.lang.Object
org.apache.fop.layoutmgr.Keep
Object representing a keep constraint, corresponding
to the XSL-FO keep properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompare this Keep instance to another one, and return the stronger one if the context is the sameintReturns the context of this keep.static KeepgetKeep(KeepProperty keepProperty) Obtain a Keep instance corresponding to the givenKeepPropertyprivate static intgetKeepContextPriority(int context) private static intgetKeepStrength(Property keep) intbooleanisAuto()toString()private void
-
Field Details
-
STRENGTH_AUTO
private static final int STRENGTH_AUTOThe integer value for "auto" keep strength.- See Also:
-
STRENGTH_ALWAYS
private static final int STRENGTH_ALWAYSThe integer value for "always" keep strength.- See Also:
-
KEEP_AUTO
keep auto -
KEEP_ALWAYS
keep always -
strength
private int strength -
context
private int context
-
-
Constructor Details
-
Keep
private Keep(int strength, int context)
-
-
Method Details
-
getKeepStrength
-
getKeep
Obtain a Keep instance corresponding to the givenKeepProperty- Parameters:
keepProperty- theKeepProperty- Returns:
- a new instance corresponding to the given property
-
update
-
isAuto
public boolean isAuto()- Returns:
trueif the keep property was specified as "auto"
-
getContext
public int getContext()Returns the context of this keep.- Returns:
- one of
Constants.EN_LINE,Constants.EN_COLUMNorConstants.EN_PAGE
-
getPenalty
public int getPenalty()- Returns:
- the penalty value corresponding to the strength of this Keep
-
getKeepContextPriority
private static int getKeepContextPriority(int context) -
compare
-
toString
-