org.apache.fop.layoutmgr

Class BreakElement


public class BreakElement
extends UnresolvedListElement

This class represents an unresolved break possibility.

Constructor Summary

BreakElement(Position position, int penaltyWidth, int penaltyValue, int breakClass, LayoutContext context)
Constructor for hard breaks.
BreakElement(Position position, int penaltyValue, LayoutContext context)
Main constructor

Method Summary

int
getBreakClass()
int
getPenaltyValue()
int
getPenaltyWidth()
List
getPendingAfterMarks()
List
getPendingBeforeMarks()
boolean
isConditional()
boolean
isForcedBreak()
void
setBreakClass(int breakClass)
Sets the break class.
void
setPenaltyValue(int p)
Sets the penalty value.
String
toString()

Methods inherited from class org.apache.fop.layoutmgr.UnresolvedListElement

getOriginatingLayoutManager, isConditional

Methods inherited from class org.apache.fop.layoutmgr.ListElement

getLayoutManager, getPosition, isBox, isForcedBreak, isGlue, isPenalty, isUnresolvedElement, setPosition

Constructor Details

BreakElement

public BreakElement(Position position,
                    int penaltyWidth,
                    int penaltyValue,
                    int breakClass,
                    LayoutContext context)
Constructor for hard breaks.
Parameters:
position - the Position instance needed by the addAreas stage of the LMs.
penaltyWidth - the penalty width
penaltyValue - the penalty value for the penalty element to be constructed
breakClass - the break class of this penalty (one of the break-* constants)
context - the layout context which contains the pending conditional elements

BreakElement

public BreakElement(Position position,
                    int penaltyValue,
                    LayoutContext context)
Main constructor
Parameters:
position - the Position instance needed by the addAreas stage of the LMs.
penaltyValue - the penalty value for the penalty element to be constructed
context - the layout context which contains the pending conditional elements

Method Details

getBreakClass

public int getBreakClass()
Returns:
the break class of this penalty (one of the break-* constants)

getPenaltyValue

public int getPenaltyValue()
Returns:
the penalty value

getPenaltyWidth

public int getPenaltyWidth()
Returns:
the penalty width

getPendingAfterMarks

public List getPendingAfterMarks()
Returns:
the pending border and padding elements at the after edge

getPendingBeforeMarks

public List getPendingBeforeMarks()
Returns:
the pending border and padding elements at the before edge

isConditional

public boolean isConditional()
Overrides:
isConditional in interface UnresolvedListElement

isForcedBreak

public boolean isForcedBreak()
Overrides:
isForcedBreak in interface ListElement

setBreakClass

public void setBreakClass(int breakClass)
Sets the break class.
Parameters:
breakClass - the new break class

setPenaltyValue

public void setPenaltyValue(int p)
Sets the penalty value.
Parameters:
p - the new penalty value

toString

public String toString()
See Also:
java.lang.Object.toString()

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.