fop 0.95

org.apache.fop.area.inline
Class AbstractTextArea

java.lang.Object
  extended by org.apache.fop.area.AreaTreeObject
      extended by org.apache.fop.area.Area
          extended by org.apache.fop.area.inline.InlineArea
              extended by org.apache.fop.area.inline.InlineParent
                  extended by org.apache.fop.area.inline.AbstractTextArea
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Character, TextArea

public abstract class AbstractTextArea
extends InlineParent

Abstract base class for both TextArea and Character.

See Also:
Serialized Form

Nested Class Summary
protected  class AbstractTextArea.TextAdjustingInfo
          this class stores information about spaces and potential adjustments that can be used in order to re-compute adjustments when a page-number or a page-number-citation is resolved
 
Nested classes/interfaces 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
adjustingInfo, 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
 
Fields inherited from class org.apache.fop.area.AreaTreeObject
foreignAttributes
 
Constructor Summary
AbstractTextArea()
          Default constructor
AbstractTextArea(int stretch, int shrink, int adj)
          Constructor with extra parameters: create a TextAdjustingInfo object
 
Method Summary
 boolean applyVariationFactor(double variationFactor, int lineStretch, int lineShrink)
          recursively apply the variation factor to all descendant areas
 int getBaselineOffset()
          Get baseline offset, i.e.
 int getTextLetterSpaceAdjust()
          Get text letter space adjust.
 int getTextWordSpaceAdjust()
          Get text word space adjust.
 void setBaselineOffset(int baselineOffset)
          Set the baseline offset.
 void setSpaceDifference(int spaceDiff)
          Set the difference between optimal width of a space and default width of a space according to the font; this part of the space adjustment is fixed and must not be multiplied by the variation factor.
 void setTextLetterSpaceAdjust(int textLetterSpaceAdjust)
          Set text letter space adjust.
 void setTextWordSpaceAdjust(int textWordSpaceAdjust)
          Set text word space adjust.
 
Methods inherited from class org.apache.fop.area.inline.InlineParent
addChildArea, getChildAreas
 
Methods inherited from class org.apache.fop.area.inline.InlineArea
getAdjustingInfo, getOffset, getParentArea, handleIPDVariation, hasLineThrough, hasOverline, hasUnderline, increaseIPD, isBlinking, notifyIPDVariation, setAdjustingInfo, setAdjustment, 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 org.apache.fop.area.AreaTreeObject
getForeignAttributes, getForeignAttributeValue, setForeignAttribute, setForeignAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTextArea

public AbstractTextArea()
Default constructor


AbstractTextArea

public AbstractTextArea(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 adjustment of the area
Method Detail

getTextWordSpaceAdjust

public int getTextWordSpaceAdjust()
Get text word space adjust.

Returns:
the text word space adjustment

setTextWordSpaceAdjust

public void setTextWordSpaceAdjust(int textWordSpaceAdjust)
Set text word space adjust.

Parameters:
textWordSpaceAdjust - the text word space adjustment

getTextLetterSpaceAdjust

public int getTextLetterSpaceAdjust()
Get text letter space adjust.

Returns:
the text letter space adjustment

setTextLetterSpaceAdjust

public void setTextLetterSpaceAdjust(int textLetterSpaceAdjust)
Set text letter space adjust.

Parameters:
textLetterSpaceAdjust - the text letter space adjustment

setSpaceDifference

public void setSpaceDifference(int spaceDiff)
Set the difference between optimal width of a space and default width of a space according to the font; this part of the space adjustment is fixed and must not be multiplied by the variation factor.

Parameters:
spaceDiff - the space difference

applyVariationFactor

public boolean applyVariationFactor(double variationFactor,
                                    int lineStretch,
                                    int lineShrink)
recursively apply the variation factor to all descendant areas

Overrides:
applyVariationFactor in class InlineParent
Parameters:
variationFactor - the variation factor that must be applied to adjustments
lineStretch - the total stretch of the line
lineShrink - the total shrink of the line
Returns:
true if there is an UnresolvedArea descendant

getBaselineOffset

public int getBaselineOffset()
Get baseline offset, i.e. the distance from the before edge of this area to the nominal baseline.

Returns:
the baseline offset

setBaselineOffset

public void setBaselineOffset(int baselineOffset)
Set the baseline offset.

Parameters:
baselineOffset - the baseline offset

fop 0.95

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