org.jfree.layouting.renderer.model
Class RenderNode
java.lang.Object
org.jfree.layouting.renderer.model.RenderNode
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- FinishedRenderNode, PlaceholderRenderNode, RenderableReplacedContent, RenderableText, RenderBox, SpacerRenderNode
public abstract class RenderNode
- extends java.lang.Object
- implements java.lang.Cloneable
A node of the rendering model. The renderer model keeps track of the
rendering state - what has already been rendered, what is pending, etc.
Things that have been rendered completely get removed from the model.
The default model makes some assumptions about the node processing:
- Once placed somewhere, nodes will never move anywhere else
- Once size computation is complete, nodes will not be modified
anymore.
Finished nodes can be removed as soon as they have been physically rendered.
In case a node cannot be rendered right now (think of tables, which need all
cells before a row or in some cases even the columns can be computed), a cell
receives the 'pending' flag. If a cell is added to a parent which is pending,
the cell is pending as well. The pending state must be resolved by the
outer-most element. An element cannot be finished or removed unless it
resolved the pending state.
- Author:
- Thomas Morgner
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HORIZONTAL_AXIS
public static final int HORIZONTAL_AXIS
- See Also:
- Constant Field Values
VERTICAL_AXIS
public static final int VERTICAL_AXIS
- See Also:
- Constant Field Values
RenderNode
public RenderNode()
appyStyle
public void appyStyle(LayoutContext context,
OutputProcessorMetaData metaData)
getComputedLayoutProperties
public ComputedLayoutProperties getComputedLayoutProperties()
setComputedLayoutProperties
public void setComputedLayoutProperties(ComputedLayoutProperties clp)
getLayoutContext
public LayoutContext getLayoutContext()
isDirty
public boolean isDirty()
setDirty
public void setDirty(boolean dirty)
getNamespace
public java.lang.String getNamespace()
getTagName
public java.lang.String getTagName()
normalizeAlignment
protected CSSValue normalizeAlignment(CSSValue verticalAlignment)
getVerticalAlignment
public CSSValue getVerticalAlignment()
getBaselineShiftResolved
public RenderLength getBaselineShiftResolved()
getAlignmentBaseline
public CSSValue getAlignmentBaseline()
getBaselineShift
public CSSValue getBaselineShift()
getAlignmentAdjust
public CSSValue getAlignmentAdjust()
getAlignmentAdjustResolved
public RenderLength getAlignmentAdjustResolved()
getPageContext
public PageContext getPageContext()
getInstanceId
public java.lang.Object getInstanceId()
getMajorAxis
public int getMajorAxis()
setMajorAxis
protected void setMajorAxis(int majorAxis)
getMinorAxis
public int getMinorAxis()
setMinorAxis
protected void setMinorAxis(int minorAxis)
setWidth
public void setWidth(long width)
getWidth
public long getWidth()
setHeight
public void setHeight(long height)
getHeight
public long getHeight()
getX
public long getX()
setX
public void setX(long x)
setPosition
public final void setPosition(int axis,
long value)
getPosition
public final long getPosition(int axis)
setDimension
public final void setDimension(int axis,
long value)
getDimension
public final long getDimension(int axis)
getY
public long getY()
setY
public void setY(long y)
getParent
public RenderBox getParent()
setParent
protected void setParent(RenderBox parent)
getVisiblePrev
public RenderNode getVisiblePrev()
getPrev
public RenderNode getPrev()
setPrev
protected void setPrev(RenderNode prev)
getVisibleNext
public RenderNode getVisibleNext()
getNext
public RenderNode getNext()
setNext
protected void setNext(RenderNode next)
getLogicalPage
public LogicalPageBox getLogicalPage()
getNormalFlow
public NormalFlowRenderBox getNormalFlow()
clone
public java.lang.Object clone()
- Clones this node. Be aware that cloning can get you into deep trouble, as
the relations this node has may no longer be valid.
- Overrides:
clone
in class java.lang.Object
- Returns:
derive
public RenderNode derive(boolean deep)
- Derive creates a disconnected node that shares all the properties of the
original node. The derived node will no longer have any parent, silbling,
child or any other relationships with other nodes.
- Returns:
hibernate
public RenderNode hibernate()
- Derives an hibernation copy. The resulting object should get stripped of
all unnecessary caching information and all objects, which will be
regenerated when the layouting restarts. Size does matter here.
- Returns:
deriveFrozen
public RenderNode deriveFrozen(boolean deep)
isFrozen
public boolean isFrozen()
isHibernated
public boolean isHibernated()
setHibernated
protected void setHibernated(boolean hibernated)
findNodeById
public RenderNode findNodeById(java.lang.Object instanceId)
isOpen
public boolean isOpen()
isEmpty
public boolean isEmpty()
getParentBlockContext
public RenderBox getParentBlockContext()
isDiscardable
public boolean isDiscardable()
isIgnorableForRendering
public boolean isIgnorableForRendering()
- If that method returns true, the element will not be used for rendering.
For the purpose of computing sizes or performing the layouting (in the
validate() step), this element will treated as if it is not there.
If the element reports itself as non-empty, however, it will affect the
margin computation.
- Returns:
getNodeLayoutProperties
public NodeLayoutProperties getNodeLayoutProperties()
- Returns the baseline info for the given node. This can be null, if the node
does not have any baseline info at all. If the element has more than one
set of baselines, the baseline of the first element is returned.
- Returns:
freeze
public void freeze()
isDirectionLTR
public boolean isDirectionLTR()
updateChangeTracker
public void updateChangeTracker()
getChangeTracker
public long getChangeTracker()
getStickyMarker
public long getStickyMarker()
setStickyMarker
public void setStickyMarker(long stickyMarker)
getEffectiveMarginTop
public long getEffectiveMarginTop()
getEffectiveMarginBottom
public long getEffectiveMarginBottom()
getMaximumBoxWidth
public long getMaximumBoxWidth()
setMaximumBoxWidth
public void setMaximumBoxWidth(long maximumBoxWidth)
getMinimumChunkWidth
public long getMinimumChunkWidth()
setMinimumChunkWidth
public void setMinimumChunkWidth(long minimumChunkWidth)
isIcmMetricsFinished
public boolean isIcmMetricsFinished()
setIcmMetricsFinished
public void setIcmMetricsFinished(boolean icmMetricsFinished)