org.foray.area
Class AbstractInlineArea

java.lang.Object
  extended by org.foray.common.AbstractOrderedTreeNode
      extended by org.foray.area.AreaNode
          extended by org.foray.area.Area
              extended by org.foray.area.AreaFlexible
                  extended by org.foray.area.AbstractInlineArea
All Implemented Interfaces:
Iterable<org.axsl.galley.AreaNode>, TreeNode, org.axsl.area.Area, org.axsl.area.AreaNode, org.axsl.fo.FoContext, org.axsl.galley.GeneralInlineArea, OrderedTreeNode
Direct Known Subclasses:
AbstractAncestralInlineArea, ExternalGraphicArea, ForeignObjectArea, InlineContainerArea, ScalingValueCitationArea, TextArea

public abstract class AbstractInlineArea
extends AreaFlexible
implements org.axsl.galley.GeneralInlineArea

Common superclass for all areas generated by inline formatting objects. This should not be confused with the more specific class InlineArea which specifically handles areas generated by the fo:inline object.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.foray.common.AbstractOrderedTreeNode
AbstractOrderedTreeNode.PostOrderDescendantIterator
 
Constructor Summary
protected AbstractInlineArea()
          Constructor.
 
Method Summary
 int baselineX()
           
 int baselineY()
           
 org.axsl.common.value.RelativeAxis contentStackingAxis()
          Returns the content stacking axis for this area.
 int crBpd()
           
 int crIpd()
           
 int crOriginX()
           Overrides the normal Area logic to handle the adjustments needed on a line to handle centering, right-justification, etc.
 LineArea getLineArea()
           
 Area getOverflowArea(Area childRequesting)
          This method is used by child Areas to ask the parent Area into which Area the child Area's overflow should be placed.
 int getProgressionDimension()
          Returns the actual total value, in millipoints, of the size of this area (not counting space-before, etc.) in its progression direction.
 void incrementProgressionDimension(int incrementAmount)
          Change the progression-dimension used by this Area.
 boolean isAbsolutelyPositioned()
          Indicates whether this Area is positioned absolutely or relatively.
 boolean isBlockArea()
          Indicates whether this Area is a block area.
 boolean isFirstLeafOnLine()
          Indicates whether this area is the first leaf area on the ancestor line.
 boolean isLastLeafOnLine()
          Indicates whether this area is the first leaf area on the ancestor line.
 void setProgressionDimension(int progressionDimension)
          Sets the progression-dimension used by this Area.
 int traitBaselineShift()
          Returns the baseline shift amount for this area.
 int traitEndIndent()
          Returns the end-indent trait.
 int traitSpaceAfterOptimum()
          Returns the space-after optimum trait for this area.
 int traitSpaceBeforeOptimum()
          Returns the space-before optimum trait for this area.
 int traitStartIndent()
          Returns the start-indent trait.
protected  Area validateNewParent(AreaNode node)
          Standard validation routine for child classes that are setting a new parent.
 
Methods inherited from class org.foray.area.AreaFlexible
computeInitialPD, crIPDBlockArea, crOriginBPDOffset, crOriginIPDOffset, getAnteriorSpace, incrementAnteriorSpace, incrementParentPD, initializeAnteriorSpace, pdAvailable, pdUsedBySiblings, removeChild, setAnteriorSpace, setMinimumProgressionDimension, setParentPD, traitIPDimensionOpt, usedProgressionDimension, usedProgressionDimensionNormalFlow
 
Methods inherited from class org.foray.area.Area
brBpd, brIpd, brOriginBPDOffset, brOriginIPDOffset, brOriginX, brOriginY, brPoints, contentStackingAxisAbsolute, contentStackingDirectionAbsolute, crOriginY, crPoints, destinationName, generatedByExists, generatedByName, getAreaParent, getBPAxis, getFontWritingMode, getIPAxis, getNearestAncestorAreaContainer, getWritingMode, hasFenceFollowing, hasFencePreceding, isFirstChildOfParent, isInNormalFlow, isLastChildOfParent, isLinkRoot, larBPD, larIPD, larOriginX, larOriginY, linkDestination, linkType, narBPD, narIPD, narOriginX, narOriginY, nearestArea, parentAllocationWidth, prBpd, prIpd, prOriginBPDOffset, prOriginIPDOffset, prOriginX, prOriginY, referenceOrientationCumulative, shouldAdjustParentPD, traitAreaClass, traitBorderAfterWidth, traitBorderBeforeWidth, traitBorderEndWidth, traitBorderStartWidth, traitId, traitIsFirst, traitIsLast, traitIsReferenceArea, traitPaddingAfter, traitPaddingBefore, traitPaddingEnd, traitPaddingStart, traitSpaceEndOptimum, traitSpaceStartOptimum, traitWhiteSpaceTreatment
 
Methods inherited from class org.foray.area.AreaNode
ancestorArea, ancestorBlockAreaNotALineArea, ancestorBlockContentFactory, ancestorBlockOrRa, ancestorGeneratedByBlockLevelFO, ancestorLineArea, ancestorNormalBlockArea, ancestorPageCollection, ancestorReferenceArea, ancestorSpanRA, ancestorTableArea, bpdAncestorBlockOrRa, getAllowsChildren, getAreaTree, getChildAt, getChildren, getColor, getContainingReferenceArea, getFirstAreaChild, getFirstChild, getGalley, getGraftingPoint, getLastAreaChild, getLastChild, getLinkage, getLogger, getNextChildOfGeneratedBy, getNextSiblingArea, getNormalLinkage, getNormalLinkage, getOrderedParent, getPage, getParent, getPreviousChildOfGeneratedBy, getPreviousSiblingArea, getSiblings, hasUnresolvedRefId, heightContainingBlock, ipdAncestorBlockArea, ipdAncestorBlockOrRa, ipdContainingRefArea, ipdParentArea, isFirst, isFirstChildOfGeneratedBy, isGeneratedByBlockLevelFo, isLast, isLastChildOfGeneratedBy, iterator, linkage, nearestBeforeFloatArea, nearestFootnoteArea, nearestGeneratedByBlockLevelFo, nearestNormalBlockArea, nearestTableArea, optimize, optimizeChildren, registerWithLinkage, remove, removeChild, setParent, tableWidth, traitGeneratedBy, widthContainingBlock
 
Methods inherited from class org.foray.common.AbstractOrderedTreeNode
children, getChildCount, getFirstLeaf, getIndex, getLastLeaf, getLevel, getNextLeaf, getNextSibling, getPreviousLeaf, getPreviousSibling, getSharedAncestor, hasChildren, isLeaf, isNodeAncestor, isNodeDescendant, nextPostOrderNode, nextPreOrderNode, postOrderDescendantIterator, siblingIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.axsl.galley.GeneralInlineArea
traitColor, traitOverlineScore, traitOverlineScoreColor, traitThroughScore, traitThroughScoreColor, traitUnderlineScore, traitUnderlineScoreColor
 
Methods inherited from interface org.axsl.galley.Area
brBpd, brIpd, brOriginX, brOriginY, crOriginY, destinationName, generatedByExists, generatedByName, isLinkRoot, linkDestination, linkType, traitId
 
Methods inherited from interface org.axsl.galley.AreaNode
getAreaName, getChildAt, getGalley, render
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildCount, getIndex, getParent, isLeaf
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.axsl.area.AreaNode
ancestorArea, ancestorBlockContentFactory, ancestorNormalBlockArea, ancestorTableArea, getAreaName, getAreaTree, getPage, isFirstChildOfGeneratedBy, nearestGeneratedByBlockLevelFo, removeChild, siblingIndex, traitGeneratedBy
 
Methods inherited from interface org.axsl.fo.FoContext
bpdAncestorBlockOrRa, getGraftingPoint, heightContainingBlock, ipdAncestorBlockArea, ipdAncestorBlockOrRa, ipdContainingRefArea, ipdParentArea, isFirst, isLast, tableWidth, widthContainingBlock
 

Constructor Detail

AbstractInlineArea

protected AbstractInlineArea()
Constructor.

Method Detail

isBlockArea

public boolean isBlockArea()
Description copied from class: Area
Indicates whether this Area is a block area.

Overrides:
isBlockArea in class Area
Returns:
True if this Area is a block-area, false if it is an inline-area. Defaults to true. Inline areas should override this method.

contentStackingAxis

public org.axsl.common.value.RelativeAxis contentStackingAxis()
Description copied from class: Area
Returns the content stacking axis for this area.

Specified by:
contentStackingAxis in class Area
Returns:
Either RelativeAxis.BLOCK_PROGRESSION or RelativeAxis.INLINE_PROGRESSION, depending on whether the contents of this area stack in the block-progression-direction or the inline-progression-direction. The default value is that contents stack in the BPD. Classes that stack in the IPD should override this method.

getOverflowArea

public Area getOverflowArea(Area childRequesting)
                     throws org.axsl.area.AreaTreeException
Description copied from class: Area
This method is used by child Areas to ask the parent Area into which Area the child Area's overflow should be placed. Overflows start when a new LineArea cannot be create for the current BlockArea. General strategy for overflow is to recursively go up the tree until getting to any Area that knows how to solve the overflow. One general case is the page-reference-area, which should know how to create a new page.

Specified by:
getOverflowArea in class Area
Parameters:
childRequesting - Child Areas ask
Returns:
The younger sister Area that should be used to handle the overflow condition.
Throws:
org.axsl.area.AreaTreeException - If the Area is unable to find or create the overflow area.

crOriginX

public int crOriginX()
Overrides the normal Area logic to handle the adjustments needed on a line to handle centering, right-justification, etc.

Overrides:
crOriginX in class Area

baselineX

public int baselineX()
Specified by:
baselineX in interface org.axsl.galley.GeneralInlineArea

baselineY

public int baselineY()
Specified by:
baselineY in interface org.axsl.galley.GeneralInlineArea

traitBaselineShift

public int traitBaselineShift()
Returns the baseline shift amount for this area.

Returns:
The baseline shift, in millipoints.

crIpd

public int crIpd()
Specified by:
crIpd in interface org.axsl.area.Area
Specified by:
crIpd in class Area

crBpd

public int crBpd()
Specified by:
crBpd in interface org.axsl.area.Area
Specified by:
crBpd in class Area

getLineArea

public LineArea getLineArea()
Specified by:
getLineArea in interface org.axsl.galley.GeneralInlineArea

setProgressionDimension

public void setProgressionDimension(int progressionDimension)
Description copied from class: Area
Sets the progression-dimension used by this Area.

Specified by:
setProgressionDimension in class Area
Parameters:
progressionDimension - The new progression-dimension value for this Area.

incrementProgressionDimension

public void incrementProgressionDimension(int incrementAmount)
Description copied from class: Area
Change the progression-dimension used by this Area.

Specified by:
incrementProgressionDimension in class Area
Parameters:
incrementAmount - The amount by which the progression-dimension should be changed for this area. Positive values increase the progression-dimension, negative values decrease it.

getProgressionDimension

public int getProgressionDimension()
Description copied from class: Area

Returns the actual total value, in millipoints, of the size of this area (not counting space-before, etc.) in its progression direction. This value does not include space-before, etc., but does include borders and padding. For block areas, the progression dimension is the block-progression-dimension. For inline areas, it is the inline-progression-dimension.

Specified by:
getProgressionDimension in class Area
Returns:
The progressionDimension.

isAbsolutelyPositioned

public boolean isAbsolutelyPositioned()
Description copied from class: Area
Indicates whether this Area is positioned absolutely or relatively.

Specified by:
isAbsolutelyPositioned in class Area
Returns:
True iff this Area is absolutely positioned.

validateNewParent

protected Area validateNewParent(AreaNode node)
                          throws org.axsl.area.AreaTreeException
Standard validation routine for child classes that are setting a new parent.

Parameters:
node - The new parent node.
Returns:
The parent node cast as an Area.
Throws:
org.axsl.area.AreaTreeException - If the node is not either a LineArea or an AbstractInlineArea.

traitSpaceBeforeOptimum

public int traitSpaceBeforeOptimum()
Description copied from class: Area
Returns the space-before optimum trait for this area.

Specified by:
traitSpaceBeforeOptimum in class Area
Returns:
The space-before optimum trait for this area.

traitSpaceAfterOptimum

public int traitSpaceAfterOptimum()
Description copied from class: Area
Returns the space-after optimum trait for this area.

Specified by:
traitSpaceAfterOptimum in class Area
Returns:
The space-after optimum trait for this area.

traitEndIndent

public int traitEndIndent()
Description copied from class: Area
Returns the end-indent trait.

Specified by:
traitEndIndent in class Area
Returns:
The end-indent trait.

traitStartIndent

public int traitStartIndent()
Description copied from class: Area
Returns the start-indent trait.

Specified by:
traitStartIndent in class Area
Returns:
The start-indent trait.

isFirstLeafOnLine

public boolean isFirstLeafOnLine()
Indicates whether this area is the first leaf area on the ancestor line.

Returns:
True iff this area is the first leaf area on the ancestory line.

isLastLeafOnLine

public boolean isLastLeafOnLine()
Indicates whether this area is the first leaf area on the ancestor line.

Returns:
True iff this area is the first leaf area on the ancestory line.


Copyright © 2017. All rights reserved.