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.


Field Summary
protected  int align
           
protected  int alignLastLine
           
protected  java.lang.String country
           
protected  LineArea currentLineArea
           
protected  LinkSet currentLinkSet
           
protected  int endIndent
           
protected  int halfLeading
           
protected  boolean hasLines
           
protected  int hyphenate
           
protected  char hyphenationChar
           
protected  int hyphenationPushCharacterCount
           
protected  int hyphenationRemainCharacterCount
           
protected  java.lang.String language
           
protected  int lineHeight
           
protected  java.util.Vector pendingFootnotes
           
protected  int startIndent
           
protected  int textIndent
           
 
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
BlockArea(FontState fontState, int allocationWidth, int maxHeight, int startIndent, int endIndent, int textIndent, int align, int alignLastLine, int lineHeight)
           
 
Method Summary
 void addFootnote(FootnoteBody fb)
           
protected  void addLineArea(LineArea la)
          Add a Line Area to this block area.
 LineArea createNextLineArea()
          Create a new line area to add inline objects.
 void end()
          Notify this block that the area has completed layout.
 LineArea getCurrentLineArea()
          Get the current line area in this block area.
 int getEndIndent()
           
 int getHalfLeading()
           
 int getStartIndent()
           
 void render(Renderer renderer)
           
 void setHyphenation(java.lang.String language, java.lang.String country, int hyphenate, char hyphenationChar, int hyphenationPushCharacterCount, int hyphenationRemainCharacterCount)
           
 void setIndents(int startIndent, int endIndent)
           
 void setupLinkSet(LinkSet ls)
           
 int spaceLeft()
           
 void start()
           
 
Methods inherited from class org.apache.fop.layout.Area
addChild, addChildAtStart, addDisplaySpace, getAbsoluteHeight, getAllocationWidth, getBackgroundColor, getChildren, getContentHeight, getContentWidth, getfoCreator, getFontInfo, getFontState, getHeight, getIDReferences, getMaxHeight, getNearestAncestorAreaContainer, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPage, getParent, getTableCellXOffset, increaseAbsoluteHeight, increaseHeight, remove, removeChild, removeChild, setAbsoluteHeight, setAllocationWidth, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setHeight, setIDReferences, setMaxHeight, setPadding, setPage, setParent, setTableCellXOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

hasLines

protected boolean hasLines

hyphenate

protected int hyphenate

hyphenationChar

protected char hyphenationChar

hyphenationPushCharacterCount

protected int hyphenationPushCharacterCount

hyphenationRemainCharacterCount

protected int hyphenationRemainCharacterCount

language

protected java.lang.String language

country

protected java.lang.String country

pendingFootnotes

protected java.util.Vector pendingFootnotes
Constructor Detail

BlockArea

public BlockArea(FontState fontState,
                 int allocationWidth,
                 int maxHeight,
                 int startIndent,
                 int endIndent,
                 int textIndent,
                 int align,
                 int alignLastLine,
                 int lineHeight)
Method Detail

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 to. 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 inlie 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()
Overrides:
spaceLeft in class Area

getHalfLeading

public int getHalfLeading()

setHyphenation

public void setHyphenation(java.lang.String language,
                           java.lang.String country,
                           int hyphenate,
                           char hyphenationChar,
                           int hyphenationPushCharacterCount,
                           int hyphenationRemainCharacterCount)

addFootnote

public void addFootnote(FootnoteBody fb)


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