|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.common.AbstractOrderedTreeNode
org.foray.area.AreaNode
public abstract class AreaNode
Abstract superclass for all nodes in the AreaTree.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.foray.common.AbstractOrderedTreeNode |
---|
AbstractOrderedTreeNode.PostOrderDescendantIterator |
Constructor Summary | |
---|---|
protected |
AreaNode()
Constructor. |
Method Summary | |
---|---|
Area |
ancestorArea()
|
Area |
ancestorBlockAreaNotALineArea()
Returns the ancestor block area that is not a line area. |
org.axsl.area.BlockContentFactory |
ancestorBlockContentFactory()
|
Area |
ancestorBlockOrRa()
Returns the nearest ancestor Area that was generated by a block-level formatting object, if such an area exists. |
Area |
ancestorGeneratedByBlockLevelFO()
Finds the nearest ancestor area that was generated by a block-level formatting object. |
LineArea |
ancestorLineArea()
Returns the ancestor LineArea, if any. |
NormalBlockArea |
ancestorNormalBlockArea()
|
PageCollection |
ancestorPageCollection()
Returns the ancestor page collection for this area. |
Area |
ancestorReferenceArea()
Returns the nearest ancestor reference area. |
SpanRA |
ancestorSpanRA()
Returns the ancestor Span area. |
TableRA |
ancestorTableArea()
|
int |
bpdAncestorBlockOrRa()
|
boolean |
getAllowsChildren()
|
AreaTree |
getAreaTree()
Returns the ancestor AreaTree for this area. |
AreaNode |
getChildAt(int childIndex)
|
abstract List<? extends AreaNode> |
getChildren()
Return the List of this node's children. |
Color |
getColor()
Returns the color of this Area. |
Area |
getContainingReferenceArea()
Returns the nearest ancestor that is a reference area. |
Area |
getFirstAreaChild()
Returns the first child that is an Area . |
AreaNode |
getFirstChild()
Returns the first child of this node. |
org.axsl.galley.Galley |
getGalley()
Returns the ancestor Galley for this area. |
org.axsl.fo.fo.GraftingPoint |
getGraftingPoint()
|
Area |
getLastAreaChild()
Returns the last child that is an Area . |
AreaNode |
getLastChild()
Returns the last child of this node. |
abstract FOLinkage |
getLinkage()
Returns the raw "generated by" instance. |
org.apache.commons.logging.Log |
getLogger()
Return the logger. |
protected AreaNode |
getNextChildOfGeneratedBy()
Returns the next child of this area's "generated-by". |
Area |
getNextSiblingArea()
Returns the next sibling node that is an Area, if any. |
FOLinkageNormal |
getNormalLinkage()
Returns the normal linkage associated with this Area. |
FOLinkageNormal |
getNormalLinkage(org.axsl.fo.fo.GraftingPoint graftingPoint)
Use this overloaded version when we haven't yet gotten the RetrieveMarker instance stashed in the FOLinkageMarker, especially during AreaNode construction. |
OrderedTreeNode |
getOrderedParent()
Returns the parent of this node, cast as an OrderedTreeNode. |
PageRA |
getPage()
|
abstract AreaNode |
getParent()
|
protected AreaNode |
getPreviousChildOfGeneratedBy()
Returns the previous child of this area's "generated-by". |
Area |
getPreviousSiblingArea()
Returns the previous sibling node that is an Area, if any. |
List<? extends AreaNode> |
getSiblings()
Returns the List of this node's parent's children, which includes this node. |
boolean |
hasUnresolvedRefId()
Indicates whether this node is dependent on an unresolved "ref-id". |
int |
heightContainingBlock()
|
int |
ipdAncestorBlockArea()
|
int |
ipdAncestorBlockOrRa()
|
int |
ipdContainingRefArea()
|
int |
ipdParentArea()
|
boolean |
isFirst()
|
boolean |
isFirstChildOfGeneratedBy()
|
boolean |
isGeneratedByBlockLevelFo()
Indicates whether this Area was generated by a block-level FO. |
boolean |
isLast()
|
protected boolean |
isLastChildOfGeneratedBy()
Indicates whether this is the last child of this area's "generated-by". |
Iterator<org.axsl.galley.AreaNode> |
iterator()
|
FOLinkage |
linkage(org.axsl.fo.Fo foNode,
org.axsl.fo.fo.GraftingPoint graftingPoint)
Retrieves or creates a linkage item for a given FONode. |
Area |
nearestArea()
|
BeforeFloatRA |
nearestBeforeFloatArea()
Returns this area's ancestor footnote-area, if any, or this, if this is a footnote area, or null if this area is not part of a footnote. |
FootnoteRA |
nearestFootnoteArea()
Returns this area's ancestor footnote-area, if any, or this, if this is a footnote area, or null if this area is not part of a footnote. |
Area |
nearestGeneratedByBlockLevelFo()
|
NormalBlockArea |
nearestNormalBlockArea()
Returns this if this is a normal block area, or the nearest ancestor normal block area otherwise. |
TableRA |
nearestTableArea()
Retujrns this if it is an instance of TableRA , or the nearest
ancestor TableRA if it is not. |
protected abstract boolean |
optimize()
This method should be run after layout is complete, allowing cleanup and adjustments that do not affect the placement of the areas to be computed before the page is rendered. |
protected void |
optimizeChildren()
Optimizes the children of this node. |
protected void |
registerWithLinkage(org.axsl.fo.fo.GraftingPoint graftingPoint)
Creates the linkage to the FO Tree for this area. |
void |
remove()
Removes this from the parent's list of children. |
void |
removeChild(org.axsl.area.AreaNode areaNode)
|
abstract void |
setParent(AreaNode node)
Sets the parent node. |
int |
tableWidth()
|
abstract org.axsl.fo.Fo |
traitGeneratedBy()
|
int |
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.AreaNode |
---|
getAreaName, render |
Methods inherited from interface org.axsl.area.AreaNode |
---|
getAreaName, siblingIndex |
Methods inherited from interface javax.swing.tree.TreeNode |
---|
children, getChildCount, getIndex, isLeaf |
Constructor Detail |
---|
protected AreaNode()
Method Detail |
---|
protected void registerWithLinkage(org.axsl.fo.fo.GraftingPoint graftingPoint)
graftingPoint
- The ancestor grafting point, if any.public abstract AreaNode getParent()
getParent
in interface TreeNode
public OrderedTreeNode getOrderedParent()
OrderedTreeNode
getOrderedParent
in interface OrderedTreeNode
public abstract void setParent(AreaNode node) throws org.axsl.area.AreaTreeException
node
- The new parent node.
org.axsl.area.AreaTreeException
- If the parent node is not compatible with
the implementations specification for a parent node.public abstract List<? extends AreaNode> getChildren()
AbstractOrderedTreeNode
getChildren
in class AbstractOrderedTreeNode
public AreaNode getChildAt(int childIndex)
getChildAt
in interface TreeNode
public List<? extends AreaNode> getSiblings()
AbstractOrderedTreeNode
getSiblings
in class AbstractOrderedTreeNode
public void remove()
public void removeChild(org.axsl.area.AreaNode areaNode)
removeChild
in interface org.axsl.area.AreaNode
public FOLinkage linkage(org.axsl.fo.Fo foNode, org.axsl.fo.fo.GraftingPoint graftingPoint)
foNode
- The FONode for which linkage is needed.graftingPoint
- The ancestor RetrieveMarker, if any.
public FOLinkageNormal getNormalLinkage()
public FOLinkageNormal getNormalLinkage(org.axsl.fo.fo.GraftingPoint graftingPoint)
graftingPoint
- The retrieve-marker.
protected AreaNode getPreviousChildOfGeneratedBy()
protected AreaNode getNextChildOfGeneratedBy()
public boolean isFirstChildOfGeneratedBy()
isFirstChildOfGeneratedBy
in interface org.axsl.area.AreaNode
protected boolean isLastChildOfGeneratedBy()
public AreaTree getAreaTree()
getAreaTree
in interface org.axsl.area.AreaNode
public org.axsl.galley.Galley getGalley()
public Area ancestorArea()
ancestorArea
in interface org.axsl.area.AreaNode
public Area nearestArea()
nearestArea
in interface org.axsl.area.AreaNode
public Area getPreviousSiblingArea()
public Area getNextSiblingArea()
public Area ancestorBlockAreaNotALineArea()
public Area ancestorReferenceArea()
public NormalBlockArea ancestorNormalBlockArea()
ancestorNormalBlockArea
in interface org.axsl.area.AreaNode
public NormalBlockArea nearestNormalBlockArea()
public Area getContainingReferenceArea()
public PageRA getPage()
getPage
in interface org.axsl.area.AreaNode
public org.apache.commons.logging.Log getLogger()
public Area nearestGeneratedByBlockLevelFo()
nearestGeneratedByBlockLevelFo
in interface org.axsl.area.AreaNode
public Area ancestorGeneratedByBlockLevelFO()
public boolean isGeneratedByBlockLevelFo()
public abstract org.axsl.fo.Fo traitGeneratedBy()
traitGeneratedBy
in interface org.axsl.area.AreaNode
public AreaNode getFirstChild()
OrderedTreeNode
getFirstChild
in interface OrderedTreeNode
getFirstChild
in class AbstractOrderedTreeNode
public AreaNode getLastChild()
OrderedTreeNode
getLastChild
in interface OrderedTreeNode
getLastChild
in class AbstractOrderedTreeNode
public Area getFirstAreaChild()
Area
.
public Area getLastAreaChild()
Area
.
public SpanRA ancestorSpanRA()
public LineArea ancestorLineArea()
public TableRA ancestorTableArea()
ancestorTableArea
in interface org.axsl.area.AreaNode
public TableRA nearestTableArea()
TableRA
, or the nearest
ancestor TableRA
if it is not.
public org.axsl.area.BlockContentFactory ancestorBlockContentFactory()
ancestorBlockContentFactory
in interface org.axsl.area.AreaNode
public PageCollection ancestorPageCollection()
public boolean hasUnresolvedRefId()
Indicates whether this node is dependent on an unresolved "ref-id".
For example, a page-number-citation creates a PageNumberCitationArea
,
the contents of which are not known until the FO with the corresponding
"id" property returns at least one normal area in the AreaTree. Until
that normal area can be found, the PageNumberCitationArea
cannot
be resolved and rendered.
The default return value is "false". Areas that are generated by Formatting Objects for whom the property "ref-id" is used should override this method in an appropriate manner.
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
getAllowsChildren
in class AbstractOrderedTreeNode
public org.axsl.fo.fo.GraftingPoint getGraftingPoint()
getGraftingPoint
in interface org.axsl.fo.FoContext
public abstract FOLinkage getLinkage()
protected abstract boolean optimize()
PageRA.layoutComplete()
.
protected void optimizeChildren()
public FootnoteRA nearestFootnoteArea()
public BeforeFloatRA nearestBeforeFloatArea()
public Area ancestorBlockOrRa()
public int ipdAncestorBlockOrRa()
ipdAncestorBlockOrRa
in interface org.axsl.fo.FoContext
public int bpdAncestorBlockOrRa()
bpdAncestorBlockOrRa
in interface org.axsl.fo.FoContext
public Iterator<org.axsl.galley.AreaNode> iterator()
iterator
in interface Iterable<org.axsl.galley.AreaNode>
public int tableWidth()
tableWidth
in interface org.axsl.fo.FoContext
public int ipdAncestorBlockArea()
ipdAncestorBlockArea
in interface org.axsl.fo.FoContext
public int widthContainingBlock()
widthContainingBlock
in interface org.axsl.fo.FoContext
public int heightContainingBlock()
heightContainingBlock
in interface org.axsl.fo.FoContext
public boolean isFirst()
isFirst
in interface org.axsl.fo.FoContext
public boolean isLast()
isLast
in interface org.axsl.fo.FoContext
public int ipdContainingRefArea()
ipdContainingRefArea
in interface org.axsl.fo.FoContext
public int ipdParentArea()
ipdParentArea
in interface org.axsl.fo.FoContext
public Color getColor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |