fop 0.92beta

org.apache.fop.area.inline
Class TextArea

java.lang.Object
  extended byorg.apache.fop.area.Area
      extended byorg.apache.fop.area.inline.InlineArea
          extended byorg.apache.fop.area.inline.InlineParent
              extended byorg.apache.fop.area.inline.AbstractTextArea
                  extended byorg.apache.fop.area.inline.TextArea
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UnresolvedPageNumber

public class TextArea
extends AbstractTextArea

A text inline area.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.apache.fop.area.inline.AbstractTextArea
AbstractTextArea.TextAdjustingInfo
 
Nested classes inherited from class org.apache.fop.area.inline.InlineArea
InlineArea.InlineAdjustingInfo
 
Field Summary
 
Fields inherited from class org.apache.fop.area.inline.InlineParent
autoSize, inlines
 
Fields inherited from class org.apache.fop.area.inline.InlineArea
offset
 
Fields inherited from class org.apache.fop.area.Area
bpd, BT, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, ipd, log, LR, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, props, RL, TB
 
Constructor Summary
TextArea()
          Create a text inline area
TextArea(int stretch, int shrink, int adj)
          Constructor with extra parameters: create a TextAdjustingInfo object
 
Method Summary
 void addSpace(char space, int offset, boolean adjustable)
          Create and add a SpaceArea child to this TextArea
 void addWord(java.lang.String word, int offset)
          Create and add a WordArea child to this TextArea.
 void addWord(java.lang.String word, int offset, int[] letterAdjust)
          Create and add a WordArea child to this TextArea.
 java.lang.String getText()
          Get the whole text string.
 void removeText()
          Remove the old text
 void updateIPD(int newIPD)
          set the ipd and notify the parent area about the variation; this happens when a page-number or a page-number-citation is resolved to its actual value
 
Methods inherited from class org.apache.fop.area.inline.AbstractTextArea
applyVariationFactor, getBaselineOffset, getTextLetterSpaceAdjust, getTextWordSpaceAdjust, setBaselineOffset, setSpaceDifference, setTextLetterSpaceAdjust, setTextWordSpaceAdjust
 
Methods inherited from class org.apache.fop.area.inline.InlineParent
addChildArea, getChildAreas
 
Methods inherited from class org.apache.fop.area.inline.InlineArea
getOffset, getParentArea, hasLineThrough, hasOverline, hasUnderline, increaseIPD, isBlinking, notifyIPDVariation, setOffset, setParentArea
 
Methods inherited from class org.apache.fop.area.Area
addTrait, addTrait, getAllocBPD, getAllocIPD, getAreaClass, getBooleanTrait, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsInteger, getTraits, hasTrait, hasTraits, setAreaClass, setBPD, setIPD, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextArea

public TextArea()
Create a text inline area


TextArea

public TextArea(int stretch,
                int shrink,
                int adj)
Constructor with extra parameters: create a TextAdjustingInfo object

Parameters:
stretch - the available stretch of the text
shrink - the available shrink of the text
adj - the current total adjustment
Method Detail

removeText

public void removeText()
Remove the old text


addWord

public void addWord(java.lang.String word,
                    int offset)
Create and add a WordArea child to this TextArea.

Parameters:
word - the word string
offset - the offset for the next area

addWord

public void addWord(java.lang.String word,
                    int offset,
                    int[] letterAdjust)
Create and add a WordArea child to this TextArea.

Parameters:
word - the word string
offset - the offset for the next area

addSpace

public void addSpace(char space,
                     int offset,
                     boolean adjustable)
Create and add a SpaceArea child to this TextArea

Parameters:
space - the space character
offset - the offset for the next area
adjustable - is this space adjustable?

getText

public java.lang.String getText()
Get the whole text string. Renderers whose space adjustment handling is not affected by multi-byte characters can use this method to render the whole TextArea at once; the other renderers (for example PDFRenderer) have to implement renderWord(WordArea) and renderSpace(SpaceArea) in order to correctly place each text fragment.

Returns:
the text string

updateIPD

public void updateIPD(int newIPD)
set the ipd and notify the parent area about the variation; this happens when a page-number or a page-number-citation is resolved to its actual value

Overrides:
updateIPD in class InlineArea
Parameters:
newIPD - the new ipd of the area

fop 0.92beta

Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.