org.apache.fop.layout
Class BlockArea
java.lang.Object
|
+--org.apache.fop.layout.Box
|
+--org.apache.fop.layout.Area
|
+--org.apache.fop.layout.BlockArea
- public class BlockArea
- extends Area
This class represents a Block Area.
A block area is made up of a sequence of Line Areas.
This class is used to organise the sequence of line areas as
inline areas are added to this block it creates and ands line areas
to hold the inline areas.
This uses the line-height and line-stacking-strategy to work
out how to stack the lines.
Fields inherited from class org.apache.fop.layout.Area |
allocationWidth, areaClass, background, bp, children, contentRectangleWidth, currentHeight, foCreator, fontState, generatedBy, isFirst, isLast, maxHeight, page, tableCellXOffset |
Constructor Summary |
BlockArea(FontState fontState,
int allocationWidth,
int maxHeight,
int startIndent,
int endIndent,
int textIndent,
int align,
int alignLastLine,
int lineHeight)
|
Methods inherited from class org.apache.fop.layout.Area |
addChild, addChildAtStart, addDisplaySpace, addInlineSpace, getAbsoluteHeight, getAllocationWidth, getBackground, getBorderAndPadding, getBorderBottomWidth, getBorderLeftWidth, getBorderRightWidth, getBorderTopWidth, getChildren, getContentHeight, getContentWidth, getfoCreator, getFontInfo, getFontState, getGeneratedBy, getHeight, getIDReferences, getMaxHeight, getNearestAncestorAreaContainer, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPage, getParent, getTableCellXOffset, hasChildren, hasNonSpaceChildren, increaseHeight, isFirst, isFirst, isLast, isLast, remove, removeChild, removeChild, setAbsoluteHeight, setAllocationWidth, setBackground, setBorderAndPadding, setGeneratedBy, setHeight, setIDReferences, setMaxHeight, setPage, setParent, setTableCellXOffset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
startIndent
protected int startIndent
endIndent
protected int endIndent
textIndent
protected int textIndent
lineHeight
protected int lineHeight
halfLeading
protected int halfLeading
align
protected int align
alignLastLine
protected int alignLastLine
currentLineArea
protected LineArea currentLineArea
currentLinkSet
protected LinkSet currentLinkSet
hyphProps
protected HyphenationProps hyphProps
pendingFootnotes
protected java.util.ArrayList pendingFootnotes
BlockArea
public BlockArea(FontState fontState,
int allocationWidth,
int maxHeight,
int startIndent,
int endIndent,
int textIndent,
int align,
int alignLastLine,
int lineHeight)
render
public void render(Renderer renderer)
- Overrides:
render
in class Box
addLineArea
protected void addLineArea(LineArea la)
- Add a Line Area to this block area.
Used internally to add a completed line area to this block area
when either a new line area is created or this block area is
completed.
- Parameters:
la
- the LineArea to add
getCurrentLineArea
public LineArea getCurrentLineArea()
- Get the current line area in this block area.
This is used to get the current line area for adding
inline objects.
This will return null if there is not enough room left
in the block area to accomodate the line area.
- Returns:
- the line area to be used to add inline objects
createNextLineArea
public LineArea createNextLineArea()
- Create a new line area to add inline objects.
This should be called after getting the current line area
and discovering that the inline object will not fit inside the current
line. This method will create a new line area to place the inline
object into.
This will return null if the new line cannot fit into the block area.
- Returns:
- the new current line area, which will be empty.
setupLinkSet
public void setupLinkSet(LinkSet ls)
end
public void end()
- Notify this block that the area has completed layout.
Indicates the the block has been fully laid out, this will
add (if any) the current line area.
- Overrides:
end
in class Area
start
public void start()
- Overrides:
start
in class Area
getEndIndent
public int getEndIndent()
getStartIndent
public int getStartIndent()
setIndents
public void setIndents(int startIndent,
int endIndent)
spaceLeft
public int spaceLeft()
- Return the maximum space remaining for this area's content in
the block-progression-dimension.
Remove top and bottom padding and spacing since these reduce
available space for content and they are not yet accounted for
in the positioning of the object.
- Overrides:
spaceLeft
in class Area
- Following copied from class:
org.apache.fop.layout.Area
- Returns:
- space remaining in base units (millipoints)
getHalfLeading
public int getHalfLeading()
setHyphenation
public void setHyphenation(HyphenationProps hyphProps)
addFootnote
public void addFootnote(FootnoteBody fb)
Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.