Package org.apache.fop.layoutmgr
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 -
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 givenKeepPropertyintbooleanisAuto()toString()
-
Field Details
-
KEEP_AUTO
keep auto -
KEEP_ALWAYS
keep always
-
-
Method Details
-
getKeep
Obtain a Keep instance corresponding to the givenKeepProperty- Parameters:
keepProperty- theKeepProperty- Returns:
- a new instance corresponding to the given property
-
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
-
compare
Compare this Keep instance to another one, and return the stronger one if the context is the same- Parameters:
other- the instance to compare to- Returns:
- the winning Keep instance
-
toString
-