public class BreakElement extends UnresolvedListElement
| Constructor | Description |
|---|---|
BreakElement(Position position,
int penaltyWidth,
int penaltyValue,
int breakClass,
LayoutContext context) |
Constructor for hard breaks.
|
BreakElement(Position position,
int penaltyValue,
int breakClass,
LayoutContext context) |
Create a new BreakElement for the given
position, penaltyValue
and breakClass. |
BreakElement(Position position,
int penaltyValue,
LayoutContext context) |
Main constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
clearPendingMarks() |
Clears all pending marks associated with this break element.
|
int |
getBreakClass() |
Returns the break class of this penalty.
|
int |
getPenaltyValue() |
|
int |
getPenaltyWidth() |
|
java.util.List |
getPendingAfterMarks() |
|
java.util.List |
getPendingBeforeMarks() |
|
boolean |
isConditional() |
|
boolean |
isForcedBreak() |
|
void |
setBreakClass(int breakClass) |
Sets the break class.
|
void |
setPenaltyValue(int p) |
Sets the penalty value.
|
java.lang.String |
toString() |
getLayoutManager, getPosition, isBox, isGlue, isPenalty, isUnresolvedElement, setPositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOriginatingLayoutManagerpublic BreakElement(Position position, int penaltyValue, LayoutContext context)
position - the Position instance needed by the addAreas stage of the LMs.penaltyValue - the penalty value for the penalty element to be constructedcontext - the layout context which contains the pending conditional elementspublic BreakElement(Position position, int penaltyValue, int breakClass, LayoutContext context)
position, penaltyValue
and breakClass. (Used principally to generate break-possibilities in
ranges of content that must be kept together within the context corresponding
to the breakClass; expected to be one of
Constants.EN_AUTO,
Constants.EN_LINE,
Constants.EN_COLUMN or
Constants.EN_PAGE)position - the corresponding PositionpenaltyValue - the penalty valuebreakClass - the break classcontext - the LayoutContextpublic BreakElement(Position position, int penaltyWidth, int penaltyValue, int breakClass, LayoutContext context)
position - the Position instance needed by the addAreas stage of the LMs.penaltyWidth - the penalty widthpenaltyValue - the penalty value for the penalty element to be constructedbreakClass - the break class of this penalty (one of
Constants.EN_AUTO,
Constants.EN_COLUMN,
Constants.EN_PAGE,
Constants.EN_EVEN_PAGE,
Constants.EN_ODD_PAGE)context - the layout context which contains the pending conditional elementspublic boolean isConditional()
isConditional in class UnresolvedListElementpublic int getPenaltyWidth()
public int getPenaltyValue()
public void setPenaltyValue(int p)
p - the new penalty valuepublic boolean isForcedBreak()
isForcedBreak in class ListElementpublic int getBreakClass()
Constants.EN_AUTO,
Constants.EN_COLUMN,
Constants.EN_PAGE,
Constants.EN_EVEN_PAGE,
Constants.EN_ODD_PAGE.public void setBreakClass(int breakClass)
breakClass - one of
Constants.EN_AUTO,
Constants.EN_LINE,
Constants.EN_COLUMN,
Constants.EN_PAGE,
Constants.EN_EVEN_PAGE,
Constants.EN_ODD_PAGE.public java.util.List getPendingBeforeMarks()
public java.util.List getPendingAfterMarks()
public void clearPendingMarks()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.