Class SpacerRenderNode
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
-
- org.pentaho.reporting.engine.classic.core.layout.model.SpacerRenderNode
-
- All Implemented Interfaces:
Cloneable
public final class SpacerRenderNode extends RenderNode
A spacer reserves space for whitespaces found in the text. When encountered at the beginning or end of lines, it gets removed. Spacers are always considered discardable, so when encountered alone, they will get pruned.- Author:
- Thomas Morgner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
RenderNode.CacheState
-
-
Field Summary
-
Fields inherited from class org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
CACHE_CLEAN, CACHE_DEEP_DIRTY, CACHE_DIRTY, HORIZONTAL_AXIS, VERTICAL_AXIS
-
-
Constructor Summary
Constructors Constructor Description SpacerRenderNode()
SpacerRenderNode(long width, long height, boolean preserve, int spaceCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNodeType()
int
getSpaceCount()
Returns the number of space-characters that resulted in this spacer-node.boolean
isDiscardable()
boolean
isEmpty()
boolean
isIgnorableForRendering()
If that method returns true, the element will not be used for rendering.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
apply, clone, derive, deriveFrozen, findNodeById, freeze, getApplyState, getAttributes, getCachedAge, getCachedHeight, getCachedWidth, getCachedX, getCachedX2, getCachedY, getCachedY2, getCacheState, getChangeTracker, getChildCount, getContentRefCount, getDescendantCount, getEffectiveMarginBottom, getEffectiveMarginTop, getEffectiveMinimumChunkSize, getElementType, getHeight, getInstanceId, getLayoutNodeType, getLayoutParent, getLinebreakAge, getLogicalPage, getMajorAxis, getMaximumBoxWidth, getMinimumChunkWidth, getMinorAxis, getName, getNext, getNodeLayoutProperties, getOrphanLeafCount, getOverflowAreaHeight, getOverflowAreaWidth, getParent, getPrev, getRestrictFinishedClearOut, getRowIndex, getStateKey, getStyleSheet, getTableRefCount, getValidateModelAge, getVerticalTextAlignment, getWidowLeafCount, getWidth, getX, getY, getY2, isBoxOverflowX, isBoxOverflowY, isBoxVisible, isBoxVisible, isBreakAfter, isCacheValid, isContainsReservedContent, isDeepFinishedTable, isFinishedPaginate, isFinishedTable, isFlag, isFrozen, isLinebreakCacheValid, isNodeVisible, isNodeVisible, isNodeVisible, isNodeVisible, isOpen, isOrphanLeaf, isParanoidModelChecks, isRenderBox, isSizeSpecifiesBorderBox, isValidateModelCacheValid, isValidateModelResult, isVirtualNode, isVisible, isWidowBox, markApplyStateDirty, reinit, resetValidateModelResult, setCachedAge, setCachedHeight, setCachedWidth, setCachedX, setCachedY, setFinishedPaginate, setFinishedTable, setFlag, setHeight, setLinebreakAge, setMaximumBoxWidth, setMinimumChunkWidth, setNext, setNextUnchecked, setParent, setPrev, setPrevUnchecked, setValidateModelResult, setVirtualNode, setWidowBox, setWidth, setX, setY, shift, shiftCached, updateCacheState, updateChangeTracker
-
-
-
-
Method Detail
-
getNodeType
public int getNodeType()
- Specified by:
getNodeType
in classRenderNode
-
getSpaceCount
public int getSpaceCount()
Returns the number of space-characters that resulted in this spacer-node. This is a content-creator hint to make sure that the table-exports can create the represented space more easily. A space-count of zero means, that the value is not known. In that case a renderer should apply some font-metrics magic to compute a suitable space count from the known style information.- Returns:
- the space count.
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmpty
in classRenderNode
-
isDiscardable
public boolean isDiscardable()
- Overrides:
isDiscardable
in classRenderNode
-
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.- Overrides:
isIgnorableForRendering
in classRenderNode
- Returns:
-
-