org.apache.fop.layoutmgr
public class KnuthPenalty extends KnuthElement
| Modifier and Type | Field and Description |
|---|---|
static int |
FLAGGED_PENALTY
Used for flagged penalties.
|
INFINITE| Constructor and Description |
|---|
KnuthPenalty(int w,
int p,
boolean f,
int iBreakClass,
Position pos,
boolean bAux)
Create a new KnuthPenalty.
|
KnuthPenalty(int w,
int p,
boolean f,
Position pos,
boolean bAux)
Create a new KnuthPenalty.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBreakClass() |
int |
getP() |
boolean |
isFlagged() |
boolean |
isForcedBreak() |
boolean |
isPenalty() |
void |
setBreakClass(int cl)
Sets the break class for this penalty.
|
void |
setP(int p)
Sets a new penalty value.
|
java.lang.String |
toString() |
getW, getY, getZ, isAuxiliary, isUnresolvedElementgetLayoutManager, getPosition, isBox, isGlue, setPositionpublic static final int FLAGGED_PENALTY
public KnuthPenalty(int w,
int p,
boolean f,
Position pos,
boolean bAux)
w - the width of this penaltyp - the penalty value of this penaltyf - is this penalty flagged?pos - the Position stored in this penaltybAux - is this penalty auxiliary?public KnuthPenalty(int w,
int p,
boolean f,
int iBreakClass,
Position pos,
boolean bAux)
w - the width of this penaltyp - the penalty value of this penaltyf - is this penalty flagged?iBreakClass - 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)pos - the Position stored in this penaltybAux - is this penalty auxiliary?public boolean isPenalty()
isPenalty in class ListElementpublic int getP()
getP in class KnuthElementpublic void setP(int p)
p - the new penalty valuepublic boolean isFlagged()
public boolean isForcedBreak()
isForcedBreak in class ListElementpublic int getBreakClass()
public void setBreakClass(int cl)
cl - the break class (EN_AUTO, EN_COLUMN, EN_PAGE, EN_EVEN_PAGE, EN_ODD_PAGE)public java.lang.String toString()
toString in class java.lang.ObjectCopyright 1999-2008 The Apache Software Foundation. All Rights Reserved.