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, backgroundColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderStyleBottom, borderStyleLeft, borderStyleRight, borderStyleTop, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, children, contentRectangleWidth, currentHeight, foCreator, fontState, maxHeight, paddingBottom, paddingLeft, paddingRight, paddingTop, page, tableCellXOffset
 
Fields inherited from class org.apache.fop.layout.Box
areaTree, parent
 
Constructor Summary
BodyAreaContainer(FontState fontState, int xPosition, int yPosition, int allocationWidth, int maxHeight, int position, int columnCount, int columnGap)
           
 
Method Summary
 void adjustFootnoteArea()
           
 AreaContainer getBeforeFloatReferenceArea()
           
 AreaContainer getCurrentColumnArea()
           
 AreaContainer getFootnoteReferenceArea()
           
 int getFootnoteState()
           
 IDReferences getIDReferences()
           
 AreaContainer getMainReferenceArea()
           
 AreaContainer getNextArea(FObj fo)
           
 int getPosition()
           
 int getRemainingHeight()
          Determine remaining height for new span area.
 int getXPosition()
           
 int getYPosition()
           
 boolean isBalancingRequired(FObj fo)
          This almost does what getNewArea() does, without actually returning an area.
 boolean isLastColumn()
          Used in Flow when layout returns incomplete.
 boolean isNewSpanArea()
          This variable is unset by getNextArea(), is set by addSpanArea(), and may be set by resetSpanArea().
 boolean needsFootnoteAdjusting()
           
 void render(Renderer renderer)
           
protected static void resetMaxHeight(Area ar, int change)
           
 void resetSpanArea()
          This is where the balancing algorithm lives, or gets called.
 void setIDReferences(IDReferences idReferences)
           
 void setXPosition(int value)
           
 void setYPosition(int value)
           
 
Methods inherited from class org.apache.fop.layout.Area
addChild, addChildAtStart, addDisplaySpace, end, getAbsoluteHeight, getAllocationWidth, getBackgroundColor, getChildren, getContentHeight, getContentWidth, getfoCreator, getFontInfo, getFontState, getHeight, getMaxHeight, getNearestAncestorAreaContainer, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPage, getParent, getTableCellXOffset, increaseAbsoluteHeight, increaseHeight, remove, removeChild, removeChild, setAbsoluteHeight, setAllocationWidth, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setHeight, setMaxHeight, setPadding, setPage, setParent, setTableCellXOffset, spaceLeft, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BodyAreaContainer

public BodyAreaContainer(FontState fontState,
                         int xPosition,
                         int yPosition,
                         int allocationWidth,
                         int maxHeight,
                         int position,
                         int columnCount,
                         int columnGap)
Method Detail

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

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

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.

isLastColumn

public boolean isLastColumn()
Used in Flow when layout returns incomplete.

isNewSpanArea

public boolean isNewSpanArea()
This variable is unset by getNextArea(), is set by addSpanArea(), and may be set by resetSpanArea().

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-2001 Apache Software Foundation. All Rights Reserved.