org.apache.fop.layout
Class LineArea

java.lang.Object
  extended byorg.apache.fop.layout.Box
      extended byorg.apache.fop.layout.Area
          extended byorg.apache.fop.layout.LineArea

public class LineArea
extends Area


Nested Class Summary
 class LineArea.Leader
           
 
Field Summary
protected  int allocationHeight
           
protected  int embeddedLinkStart
           
protected  int endIndent
           
protected  int halfLeading
           
protected  int lineHeight
           
protected static int MULTIBYTECHAR
           
protected  int nominalFontSize
           
protected  int nominalGlyphHeight
           
protected static int NOTHING
           
protected  boolean prevLTState
           
protected  boolean prevOlState
           
protected  boolean prevUlState
           
protected  int startIndent
           
protected static int TEXT
           
protected static int WHITESPACE
           
 
Fields inherited from class org.apache.fop.layout.Area
allocationWidth, areaClass, background, bp, children, contentRectangleWidth, currentHeight, foCreator, fontState, generatedBy, isFirst, isLast, maxHeight, page, tableCellXOffset
 
Fields inherited from class org.apache.fop.layout.Box
areaTree, parent
 
Constructor Summary
LineArea(FontState fontState, int lineHeight, int halfLeading, int allocationWidth, int startIndent, int endIndent, LineArea prevLineArea)
           
 
Method Summary
 int addCharacter(char data, LinkSet ls, boolean ul)
          adds a single character to the line area tree
 void addInlineArea(InlineArea box, LinkSet ls)
           
 void addInlineSpace(InlineSpace is, int spaceWidth)
           
 void addLeader(int leaderPattern, int leaderLengthMinimum, int leaderLengthOptimum, int leaderLengthMaximum, int ruleStyle, int ruleThickness, int leaderPatternWidth, int leaderAlignment)
          adds a Leader; actually the method receives the leader properties and creates a leader area or an inline area which is appended to the children of the containing line area.
 int addPageNumberCitation(java.lang.String refid, LinkSet ls)
           
 void addPending()
          adds pending inline areas to the line area normally done, when the line area is filled and added as child to the parent block area
 int addText(char[] data, int start, int end, LinkSet ls, TextState textState)
          adds text to line area
 void align(int type)
          Store text alignment.
 void changeColor(float red, float green, float blue)
           
 void changeFont(FontState fontState)
           
 void changeHyphenation(HyphenationProps hyphProps)
          sets hyphenation related traits: language, country, hyphenate, hyphenation-character and minimum number of character to remain one the previous line and to be on the next line.
 void changeVerticalAlign(int vAlign)
           
 void changeWhiteSpaceCollapse(int whiteSpaceCollapse)
           
 void changeWrapOption(int wrapOption)
           
 int doHyphenation(char[] characters, int position, int wordStart, int remainingWidth, int startw, LinkSet ls, TextState textState)
          extracts word for hyphenation and calls hyphenation package, handles cases of inword punctuation and quotation marks at the beginning of words, but not in a internationalized way
 int getEndIndent()
           
 int getHeight()
          Returns allocation height of this area.
 java.lang.String getLineText()
           
 int getPlacementOffset()
           
 int getRemainingWidth()
           
 int getStartIndent()
           
 boolean isEmpty()
           
 void render(Renderer renderer)
           
 void setLinkSet(LinkSet ls)
           
 void verticalAlign()
          Balance (vertically) the inline areas within this line.
 
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, 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, spaceLeft, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineHeight

protected int lineHeight

halfLeading

protected int halfLeading

nominalFontSize

protected int nominalFontSize

nominalGlyphHeight

protected int nominalGlyphHeight

allocationHeight

protected int allocationHeight

startIndent

protected int startIndent

endIndent

protected int endIndent

embeddedLinkStart

protected int embeddedLinkStart

NOTHING

protected static final int NOTHING
See Also:
Constant Field Values

WHITESPACE

protected static final int WHITESPACE
See Also:
Constant Field Values

TEXT

protected static final int TEXT
See Also:
Constant Field Values

MULTIBYTECHAR

protected static final int MULTIBYTECHAR
See Also:
Constant Field Values

prevUlState

protected boolean prevUlState

prevOlState

protected boolean prevOlState

prevLTState

protected boolean prevLTState
Constructor Detail

LineArea

public LineArea(FontState fontState,
                int lineHeight,
                int halfLeading,
                int allocationWidth,
                int startIndent,
                int endIndent,
                LineArea prevLineArea)
Method Detail

render

public void render(Renderer renderer)
Specified by:
render in class Box

addPageNumberCitation

public int addPageNumberCitation(java.lang.String refid,
                                 LinkSet ls)

addText

public int addText(char[] data,
                   int start,
                   int end,
                   LinkSet ls,
                   TextState textState)
adds text to line area

Returns:
int character position

addLeader

public void addLeader(int leaderPattern,
                      int leaderLengthMinimum,
                      int leaderLengthOptimum,
                      int leaderLengthMaximum,
                      int ruleStyle,
                      int ruleThickness,
                      int leaderPatternWidth,
                      int leaderAlignment)
adds a Leader; actually the method receives the leader properties and creates a leader area or an inline area which is appended to the children of the containing line area.
leader pattern use-content is not implemented.


addPending

public void addPending()
adds pending inline areas to the line area normally done, when the line area is filled and added as child to the parent block area


align

public void align(int type)
Store text alignment. The line is aligned immediately before rendering, after page numbers have been resolved.


verticalAlign

public void verticalAlign()
Balance (vertically) the inline areas within this line.


changeColor

public void changeColor(float red,
                        float green,
                        float blue)

changeFont

public void changeFont(FontState fontState)

changeWhiteSpaceCollapse

public void changeWhiteSpaceCollapse(int whiteSpaceCollapse)

changeWrapOption

public void changeWrapOption(int wrapOption)

changeVerticalAlign

public void changeVerticalAlign(int vAlign)

getEndIndent

public int getEndIndent()

getHeight

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

Overrides:
getHeight in class Area
Returns:
allocation height in millipoints

getPlacementOffset

public int getPlacementOffset()

getStartIndent

public int getStartIndent()

isEmpty

public boolean isEmpty()

changeHyphenation

public void changeHyphenation(HyphenationProps hyphProps)
sets hyphenation related traits: language, country, hyphenate, hyphenation-character and minimum number of character to remain one the previous line and to be on the next line.


doHyphenation

public int doHyphenation(char[] characters,
                         int position,
                         int wordStart,
                         int remainingWidth,
                         int startw,
                         LinkSet ls,
                         TextState textState)
extracts word for hyphenation and calls hyphenation package, handles cases of inword punctuation and quotation marks at the beginning of words, but not in a internationalized way


getRemainingWidth

public int getRemainingWidth()

setLinkSet

public void setLinkSet(LinkSet ls)

addInlineArea

public void addInlineArea(InlineArea box,
                          LinkSet ls)

addInlineSpace

public void addInlineSpace(InlineSpace is,
                           int spaceWidth)

addCharacter

public int addCharacter(char data,
                        LinkSet ls,
                        boolean ul)
adds a single character to the line area tree


getLineText

public java.lang.String getLineText()


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