org.apache.fop.layout
Class BodyAreaContainer
java.lang.Object
|
+--org.apache.fop.layout.Box
|
+--org.apache.fop.layout.Area
|
+--org.apache.fop.layout.BodyAreaContainer
- public class BodyAreaContainer
- extends Area
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 |
BodyAreaContainer(FontState fontState,
int xPosition,
int yPosition,
int allocationWidth,
int maxHeight,
int position,
int columnCount,
int columnGap)
|
Methods inherited from class org.apache.fop.layout.Area |
addChild, addChildAtStart, addDisplaySpace, addInlineSpace, end, getAbsoluteHeight, getAllocationWidth, getBackground, getBorderAndPadding, getBorderBottomWidth, getBorderLeftWidth, getBorderRightWidth, getBorderTopWidth, getChildren, getContentHeight, getContentWidth, getfoCreator, getFontInfo, getFontState, getGeneratedBy, getHeight, 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, setMaxHeight, setPage, setParent, setTableCellXOffset, spaceLeft, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BodyAreaContainer
public BodyAreaContainer(FontState fontState,
int xPosition,
int yPosition,
int allocationWidth,
int maxHeight,
int position,
int columnCount,
int columnGap)
render
public void render(Renderer renderer)
- Overrides:
render
in class Box
getPosition
public int getPosition()
getXPosition
public int getXPosition()
setXPosition
public void setXPosition(int value)
getYPosition
public int getYPosition()
setYPosition
public void setYPosition(int value)
getMainReferenceArea
public AreaContainer getMainReferenceArea()
getBeforeFloatReferenceArea
public AreaContainer getBeforeFloatReferenceArea()
getFootnoteReferenceArea
public AreaContainer getFootnoteReferenceArea()
setIDReferences
public void setIDReferences(IDReferences idReferences)
- Overrides:
setIDReferences
in class Area
getIDReferences
public IDReferences getIDReferences()
- Overrides:
getIDReferences
in class Area
getNextArea
public AreaContainer getNextArea(FObj fo)
throws FOPException
- Depending on the column-count of the next FO, determine whether
a new span area needs to be constructed or not, and return the
appropriate ColumnArea.
The next cut of this method should also inspect the FO to see
whether the area to be returned ought not to be the footnote
or before-float reference area.
- Parameters:
fo
- The next formatting object- Returns:
- the next column area (possibly the current one)
isBalancingRequired
public boolean isBalancingRequired(FObj fo)
- This almost does what getNewArea() does, without actually
returning an area. These 2 methods can be reworked.
- Parameters:
fo
- The next formatting object- Returns:
- boolean True if we need to balance.
resetSpanArea
public void resetSpanArea()
- This is where the balancing algorithm lives, or gets called.
Right now it's primitive: get the total content height in all
columns, divide by the column count, and add a heuristic
safety factor.
Then the previous (unbalanced) span area is removed, and a new
one added with the computed max height.
getRemainingHeight
public int getRemainingHeight()
- Determine remaining height for new span area. Needs to be
modified for footnote and before-float reference areas when
those are supported.
- Returns:
- int The remaining available height in millipoints.
isLastColumn
public boolean isLastColumn()
- Used in Flow when layout returns incomplete.
- Returns:
- boolean Is this the last column in this span?
isNewSpanArea
public boolean isNewSpanArea()
- This variable is unset by getNextArea(), is set by addSpanArea(),
and may be set by resetSpanArea().
- Returns:
- boolean Is the span area new or not?
getCurrentColumnArea
public AreaContainer getCurrentColumnArea()
getFootnoteState
public int getFootnoteState()
needsFootnoteAdjusting
public boolean needsFootnoteAdjusting()
adjustFootnoteArea
public void adjustFootnoteArea()
resetMaxHeight
protected static void resetMaxHeight(Area ar,
int change)
Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.