org.apache.fop.layout
Class Area

java.lang.Object
  |
  +--org.apache.fop.layout.Box
        |
        +--org.apache.fop.layout.Area
Direct Known Subclasses:
AreaContainer, BlockArea, BodyAreaContainer, ExtensionArea, InlineArea, LineArea, SVGArea

public abstract class Area
extends Box


Field Summary
protected  int allocationWidth
           
protected  ColorType backgroundColor
           
protected  BorderAndPadding bp
           
protected  java.util.Vector children
           
protected  int contentRectangleWidth
           
protected  int currentHeight
          Total height of content of this area.
 FObj foCreator
           
protected  FontState fontState
           
protected  int maxHeight
           
protected  Page page
           
protected  int tableCellXOffset
           
 
Fields inherited from class org.apache.fop.layout.Box
areaTree, parent
 
Constructor Summary
Area(FontState fontState)
           
Area(FontState fontState, int allocationWidth, int maxHeight)
          Creates a new Area instance.
 
Method Summary
 void addChild(Box child)
           
 void addChildAtStart(Box child)
           
 void addDisplaySpace(int size)
           
 void end()
           
 int getAbsoluteHeight()
           
 int getAllocationWidth()
           
 ColorType getBackgroundColor()
           
 BorderAndPadding getBorderAndPadding()
           
 int getBorderBottomWidth()
           
 int getBorderLeftWidth()
           
 int getBorderRightWidth()
           
 int getBorderTopWidth()
           
 java.util.Vector getChildren()
           
 int getContentHeight()
          Returns content height of the area.
 int getContentWidth()
           
 FObj getfoCreator()
           
 FontInfo getFontInfo()
           
 FontState getFontState()
           
 int getHeight()
          Returns allocation height of this area.
 IDReferences getIDReferences()
           
 int getMaxHeight()
           
 AreaContainer getNearestAncestorAreaContainer()
           
 int getPaddingBottom()
           
 int getPaddingLeft()
           
 int getPaddingRight()
           
 int getPaddingTop()
           
 Page getPage()
           
 Area getParent()
           
 int getTableCellXOffset()
           
 void increaseAbsoluteHeight(int value)
           
 void increaseHeight(int amount)
           
 void remove()
           
 void removeChild(Area area)
           
 void removeChild(DisplaySpace spacer)
           
 void setAbsoluteHeight(int value)
           
 void setAllocationWidth(int w)
          Set the allocation width.
 void setBackgroundColor(ColorType bgColor)
           
 void setBorderAndPadding(BorderAndPadding bp)
           
 void setHeight(int height)
          Set the content height to the passed value if that value is larger than current content height.
 void setIDReferences(IDReferences idReferences)
           
 void setMaxHeight(int height)
           
 void setPage(Page page)
           
 void setParent(Area parent)
           
 void setTableCellXOffset(int offset)
           
 int spaceLeft()
          Return space remaining in the vertical direction (height).
 void start()
           
 
Methods inherited from class org.apache.fop.layout.Box
render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontState

protected FontState fontState

bp

protected BorderAndPadding bp

children

protected java.util.Vector children

maxHeight

protected int maxHeight

currentHeight

protected int currentHeight
Total height of content of this area.

tableCellXOffset

protected int tableCellXOffset

contentRectangleWidth

protected int contentRectangleWidth

allocationWidth

protected int allocationWidth

page

protected Page page

backgroundColor

protected ColorType backgroundColor

foCreator

public FObj foCreator
Constructor Detail

Area

public Area(FontState fontState)

Area

public Area(FontState fontState,
            int allocationWidth,
            int maxHeight)
Creates a new Area instance.
Parameters:
fontState - a FontState value
allocationWidth - the inline-progression dimension of the content rectangle of the Area
maxHeight - the maximum block-progression dimension available for this Area (its allocation rectangle)
Method Detail

addChild

public void addChild(Box child)

addChildAtStart

public void addChildAtStart(Box child)

addDisplaySpace

public void addDisplaySpace(int size)

getFontInfo

public FontInfo getFontInfo()

end

public void end()

getAllocationWidth

public int getAllocationWidth()

setAllocationWidth

public void setAllocationWidth(int w)
Set the allocation width.
Parameters:
w - The new allocation width. This sets content width to the same value. Currently only called during layout of Table to set the width to the total width of all the columns. Note that this assumes the column widths are explicitly specified.

getChildren

public java.util.Vector getChildren()

getContentWidth

public int getContentWidth()

getFontState

public FontState getFontState()

getContentHeight

public int getContentHeight()
Returns content height of the area.
Returns:
Content height in millipoints

getHeight

public int getHeight()
Returns allocation height of this area. The allocation height is the sum of the content height plus border and padding in the vertical direction.
Returns:
allocation height in millipoints

getMaxHeight

public int getMaxHeight()

getPage

public Page getPage()

getBackgroundColor

public ColorType getBackgroundColor()

getPaddingTop

public int getPaddingTop()

getPaddingLeft

public int getPaddingLeft()

getPaddingBottom

public int getPaddingBottom()

getPaddingRight

public int getPaddingRight()

getBorderTopWidth

public int getBorderTopWidth()

getBorderRightWidth

public int getBorderRightWidth()

getBorderLeftWidth

public int getBorderLeftWidth()

getBorderBottomWidth

public int getBorderBottomWidth()

getTableCellXOffset

public int getTableCellXOffset()

setTableCellXOffset

public void setTableCellXOffset(int offset)

getAbsoluteHeight

public int getAbsoluteHeight()

setAbsoluteHeight

public void setAbsoluteHeight(int value)

increaseAbsoluteHeight

public void increaseAbsoluteHeight(int value)

increaseHeight

public void increaseHeight(int amount)

removeChild

public void removeChild(Area area)

removeChild

public void removeChild(DisplaySpace spacer)

remove

public void remove()

setPage

public void setPage(Page page)

setBackgroundColor

public void setBackgroundColor(ColorType bgColor)

setBorderAndPadding

public void setBorderAndPadding(BorderAndPadding bp)

spaceLeft

public int spaceLeft()
Return space remaining in the vertical direction (height). This returns maximum available space - current content height Note: content height should be based on allocation height of content!
Returns:
space remaining in base units (millipoints)

start

public void start()

setHeight

public void setHeight(int height)
Set the content height to the passed value if that value is larger than current content height. If the new content height is greater than the maximum available height, set the content height to the max. available (!!!)
Parameters:
height - allocation height of content in millipoints

setMaxHeight

public void setMaxHeight(int height)

getParent

public Area getParent()

setParent

public void setParent(Area parent)

setIDReferences

public void setIDReferences(IDReferences idReferences)

getIDReferences

public IDReferences getIDReferences()

getfoCreator

public FObj getfoCreator()

getNearestAncestorAreaContainer

public AreaContainer getNearestAncestorAreaContainer()

getBorderAndPadding

public BorderAndPadding getBorderAndPadding()


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.