|
||||||||||
| 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 TreeNodepublic 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 AbstractOrderedTreeNodepublic AreaNode getChildAt(int childIndex)
getChildAt in interface TreeNodepublic List<? extends AreaNode> getSiblings()
AbstractOrderedTreeNode
getSiblings in class AbstractOrderedTreeNodepublic 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.AreaNodeprotected boolean isLastChildOfGeneratedBy()
public AreaTree getAreaTree()
getAreaTree in interface org.axsl.area.AreaNodepublic org.axsl.galley.Galley getGalley()
public Area ancestorArea()
ancestorArea in interface org.axsl.area.AreaNodepublic Area nearestArea()
nearestArea in interface org.axsl.area.AreaNodepublic Area getPreviousSiblingArea()
public Area getNextSiblingArea()
public Area ancestorBlockAreaNotALineArea()
public Area ancestorReferenceArea()
public NormalBlockArea ancestorNormalBlockArea()
ancestorNormalBlockArea in interface org.axsl.area.AreaNodepublic NormalBlockArea nearestNormalBlockArea()
public Area getContainingReferenceArea()
public PageRA getPage()
getPage in interface org.axsl.area.AreaNodepublic org.apache.commons.logging.Log getLogger()
public Area nearestGeneratedByBlockLevelFo()
nearestGeneratedByBlockLevelFo in interface org.axsl.area.AreaNodepublic Area ancestorGeneratedByBlockLevelFO()
public boolean isGeneratedByBlockLevelFo()
public abstract org.axsl.fo.Fo traitGeneratedBy()
traitGeneratedBy in interface org.axsl.area.AreaNodepublic AreaNode getFirstChild()
OrderedTreeNode
getFirstChild in interface OrderedTreeNodegetFirstChild in class AbstractOrderedTreeNodepublic AreaNode getLastChild()
OrderedTreeNode
getLastChild in interface OrderedTreeNodegetLastChild in class AbstractOrderedTreeNodepublic Area getFirstAreaChild()
Area.
public Area getLastAreaChild()
Area.
public SpanRA ancestorSpanRA()
public LineArea ancestorLineArea()
public TableRA ancestorTableArea()
ancestorTableArea in interface org.axsl.area.AreaNodepublic TableRA nearestTableArea()
TableRA, or the nearest
ancestor TableRA if it is not.
public org.axsl.area.BlockContentFactory ancestorBlockContentFactory()
ancestorBlockContentFactory in interface org.axsl.area.AreaNodepublic 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 TreeNodegetAllowsChildren in class AbstractOrderedTreeNodepublic org.axsl.fo.fo.GraftingPoint getGraftingPoint()
getGraftingPoint in interface org.axsl.fo.FoContextpublic 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.FoContextpublic int bpdAncestorBlockOrRa()
bpdAncestorBlockOrRa in interface org.axsl.fo.FoContextpublic Iterator<org.axsl.galley.AreaNode> iterator()
iterator in interface Iterable<org.axsl.galley.AreaNode>public int tableWidth()
tableWidth in interface org.axsl.fo.FoContextpublic int ipdAncestorBlockArea()
ipdAncestorBlockArea in interface org.axsl.fo.FoContextpublic int widthContainingBlock()
widthContainingBlock in interface org.axsl.fo.FoContextpublic int heightContainingBlock()
heightContainingBlock in interface org.axsl.fo.FoContextpublic boolean isFirst()
isFirst in interface org.axsl.fo.FoContextpublic boolean isLast()
isLast in interface org.axsl.fo.FoContextpublic int ipdContainingRefArea()
ipdContainingRefArea in interface org.axsl.fo.FoContextpublic int ipdParentArea()
ipdParentArea in interface org.axsl.fo.FoContextpublic Color getColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||