org.pentaho.reporting.engine.classic.core.layout.model
Class RenderNode

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
FinishedRenderNode, RenderableText, RenderBox, SpacerRenderNode

public abstract class RenderNode
extends Object
implements Cloneable

Creation-Date: 03.04.2007, 13:16:06

Author:
Thomas Morgner

Field Summary
static int CACHE_CLEAN
           
static int CACHE_DEEP_DIRTY
           
static int CACHE_DIRTY
           
static int HORIZONTAL_AXIS
           
static int VERTICAL_AXIS
           
 
Method Summary
 void apply()
           
 Object clone()
          Clones this node.
 RenderNode derive(boolean deep)
          Derive creates a disconnected node that shares all the properties of the original node.
 RenderNode deriveFrozen(boolean deep)
           
 RenderNode findNodeById(Object instanceId)
           
 void freeze()
           
 ReportAttributeMap getAttributes()
           
 long getCachedAge()
           
 long getCachedHeight()
           
 long getCachedParentWidth()
           
 long getCachedWidth()
           
 long getCachedX()
          Returns the cached y position.
 long getCachedY()
          Returns the cached y position.
 int getCacheState()
           
 long getChangeTracker()
           
 long getComputedWidth()
           
 int getContentRefCount()
          The content-ref-count counts inline-subreports.
 long getEffectiveMarginBottom()
           
 long getEffectiveMarginTop()
           
 ElementType getElementType()
           
 long getHeight()
           
 InstanceID getInstanceId()
           
 LogicalPageBox getLogicalPage()
           
 int getMajorAxis()
           
 long getMaximumBoxWidth()
           
 long getMinimumChunkWidth()
           
 int getMinorAxis()
           
 String getName()
           
 RenderNode getNext()
           
 NodeLayoutProperties getNodeLayoutProperties()
           
abstract  int getNodeType()
           
 RenderBox getParent()
           
 RenderNode getPrev()
           
 ReportStateKey getStateKey()
           
 StyleSheet getStyleSheet()
           
 VerticalTextAlign getVerticalTextAlignment()
           
 long getWidth()
           
 long getX()
           
 long getY()
           
 RenderNode hibernate()
          Derives an hibernation copy.
 boolean isBoxOverflowX()
           
 boolean isBoxOverflowY()
           
 boolean isBoxVisible(long x, long y, long width, long height)
           
 boolean isBoxVisible(StrictBounds drawArea)
           
 boolean isBreakAfter()
           
 boolean isCacheValid()
           
 boolean isDiscardable()
           
 boolean isEmpty()
           
 boolean isFinishedPaginate()
          Checks whether this node can be removed.
 boolean isFinishedTable()
           
 boolean isFrozen()
           
 boolean isHibernated()
           
 boolean isIgnorableForRendering()
          If that method returns true, the element will not be used for rendering.
 boolean isNodeVisible(long drawAreaX0, long drawAreaY0, long drawAreaWidth, long drawAreaHeight)
           
 boolean isNodeVisible(long drawAreaX0, long drawAreaY0, long drawAreaWidth, long drawAreaHeight, boolean overflowX, boolean overflowY)
           
 boolean isNodeVisible(StrictBounds drawArea)
           
 boolean isNodeVisible(StrictBounds drawArea, boolean overflowX, boolean overflowY)
           
 boolean isOpen()
           
 boolean isSizeSpecifiesBorderBox()
           
 boolean isVirtualNode()
           
 void markCacheClean()
           
 void setCachedAge(long cachedAge)
           
 void setCachedHeight(long cachedHeight)
           
 void setCachedParentWidth(long cachedParentWidth)
           
 void setCachedWidth(long cachedWidth)
           
 void setCachedX(long cachedX)
          Defines the cached x position.
 void setCachedY(long cachedY)
          Defines the cached y position.
 void setFinishedPaginate(boolean finished)
           
 void setFinishedTable(boolean finished)
           
 void setHeight(long height)
           
 void setMaximumBoxWidth(long maximumBoxWidth)
           
 void setVirtualNode(boolean virtualNode)
           
 void setWidth(long width)
           
 void setX(long x)
           
 void setY(long y)
           
 void shift(long amount)
           
 void shiftCached(long amount)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

CACHE_CLEAN

public static final int CACHE_CLEAN
See Also:
Constant Field Values

CACHE_DIRTY

public static final int CACHE_DIRTY
See Also:
Constant Field Values

CACHE_DEEP_DIRTY

public static final int CACHE_DEEP_DIRTY
See Also:
Constant Field Values
Method Detail

getElementType

public ElementType getElementType()

getAttributes

public ReportAttributeMap getAttributes()

getContentRefCount

public int getContentRefCount()
The content-ref-count counts inline-subreports.


isSizeSpecifiesBorderBox

public boolean isSizeSpecifiesBorderBox()

getNodeType

public abstract int getNodeType()

getMinorAxis

public int getMinorAxis()

getMajorAxis

public int getMajorAxis()

getNodeLayoutProperties

public final NodeLayoutProperties getNodeLayoutProperties()

getComputedWidth

public long getComputedWidth()

getX

public final long getX()

setX

public final void setX(long x)

getY

public final long getY()

shift

public final void shift(long amount)

setY

public final void setY(long y)

getWidth

public final long getWidth()

setWidth

public final void setWidth(long width)

getHeight

public final long getHeight()

setHeight

public final void setHeight(long height)

getStyleSheet

public final StyleSheet getStyleSheet()

getInstanceId

public InstanceID getInstanceId()

getChangeTracker

public final long getChangeTracker()

getParent

public final RenderBox getParent()

getPrev

public final RenderNode getPrev()

getNext

public final RenderNode getNext()

getLogicalPage

public LogicalPageBox getLogicalPage()

clone

public 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 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.

Parameters:
deep -
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()

findNodeById

public RenderNode findNodeById(Object instanceId)

isOpen

public boolean isOpen()

isEmpty

public boolean isEmpty()

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:

freeze

public void freeze()

getMaximumBoxWidth

public long getMaximumBoxWidth()

setMaximumBoxWidth

public void setMaximumBoxWidth(long maximumBoxWidth)

getMinimumChunkWidth

public long getMinimumChunkWidth()

getEffectiveMarginTop

public long getEffectiveMarginTop()

getEffectiveMarginBottom

public long getEffectiveMarginBottom()

getVerticalTextAlignment

public VerticalTextAlign getVerticalTextAlignment()

getName

public String getName()

isBreakAfter

public boolean isBreakAfter()

getCachedAge

public final long getCachedAge()

setCachedAge

public final void setCachedAge(long cachedAge)

getCachedParentWidth

public final long getCachedParentWidth()

setCachedParentWidth

public final void setCachedParentWidth(long cachedParentWidth)

getCachedX

public final long getCachedX()
Returns the cached y position. This position is known after all layouting steps have been finished. In most cases the layouter tries to reuse the cached values instead of recomputing everything from scratch on each iteration.

The cached positions always specify the border-box. If the user specified sizes as content-box sizes, the layouter converts them into border-box sizes before filling the cache.

Returns:
the cached x position

setCachedX

public final void setCachedX(long cachedX)
Defines the cached x position. This position is known after all layouting steps have been finished. In most cases the layouter tries to reuse the cached values instead of recomputing everything from scratch on each iteration.

The cached positions always specify the border-box. If the user specified sizes as content-box sizes, the layouter converts them into border-box sizes before filling the cache.

Parameters:
cachedX - the cached x position

getCachedY

public final long getCachedY()
Returns the cached y position. This position is known after all layouting steps have been finished. In most cases the layouter tries to reuse the cached values instead of recomputing everything from scratch on each iteration.

The cached positions always specify the border-box. If the user specified sizes as content-box sizes, the layouter converts them into border-box sizes before filling the cache.

Returns:
the cached y position

setCachedY

public final void setCachedY(long cachedY)
Defines the cached y position. This position is known after all layouting steps have been finished. In most cases the layouter tries to reuse the cached values instead of recomputing everything from scratch on each iteration.

The cached positions always specify the border-box. If the user specified sizes as content-box sizes, the layouter converts them into border-box sizes before filling the cache.

Parameters:
cachedY - the cached y position

shiftCached

public final void shiftCached(long amount)

getCachedWidth

public final long getCachedWidth()

setCachedWidth

public final void setCachedWidth(long cachedWidth)

getCachedHeight

public final long getCachedHeight()

setCachedHeight

public final void setCachedHeight(long cachedHeight)

apply

public void apply()

isCacheValid

public final boolean isCacheValid()

isFinishedPaginate

public boolean isFinishedPaginate()
Checks whether this node can be removed. This flag is used by iterative streaming output targets to mark nodes that have been fully processed.

Returns:

setFinishedPaginate

public void setFinishedPaginate(boolean finished)

isFinishedTable

public boolean isFinishedTable()

setFinishedTable

public void setFinishedTable(boolean finished)

getCacheState

public int getCacheState()

markCacheClean

public void markCacheClean()

getStateKey

public ReportStateKey getStateKey()

isBoxOverflowX

public boolean isBoxOverflowX()

isBoxOverflowY

public boolean isBoxOverflowY()

isNodeVisible

public final boolean isNodeVisible(StrictBounds drawArea,
                                   boolean overflowX,
                                   boolean overflowY)

isNodeVisible

public final boolean isNodeVisible(StrictBounds drawArea)

isNodeVisible

public final boolean isNodeVisible(long drawAreaX0,
                                   long drawAreaY0,
                                   long drawAreaWidth,
                                   long drawAreaHeight)

isNodeVisible

public final boolean isNodeVisible(long drawAreaX0,
                                   long drawAreaY0,
                                   long drawAreaWidth,
                                   long drawAreaHeight,
                                   boolean overflowX,
                                   boolean overflowY)

isVirtualNode

public boolean isVirtualNode()

setVirtualNode

public void setVirtualNode(boolean virtualNode)

isBoxVisible

public final boolean isBoxVisible(StrictBounds drawArea)

isBoxVisible

public final boolean isBoxVisible(long x,
                                  long y,
                                  long width,
                                  long height)