Class RenderBox
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
-
- org.pentaho.reporting.engine.classic.core.layout.model.RenderBox
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
AutoRenderBox
,BlockRenderBox
,CanvasRenderBox
,InlineRenderBox
,RenderableReplacedContentBox
,RowRenderBox
,TableColumnGroupNode
,TableColumnNode
,TableRowRenderBox
public abstract class RenderBox extends RenderNode
Creation-Date: 03.04.2007, 13:17:47- Author:
- Thomas Morgner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RenderBox.BreakIndicator
static class
RenderBox.RestrictFinishClearOut
-
Nested classes/interfaces inherited from class org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
RenderNode.CacheState
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
FLAG_BOX_CONTAINS_PRESERVED_CONTENT
protected static int
FLAG_BOX_INVALID_WIDOW_ORPHAN_NODE
protected static int
FLAG_BOX_TABLE_SECTION_RESERVED
protected static int
FLAG_BOX_TABLE_SECTION_RESERVED2
protected static int
FLAG_BOX_TABLE_SECTION_RESERVED3
protected static int
FLAG_BOX_TABLE_SECTION_RESERVED4
protected static int
FLAG_BOX_TABLE_SECTION_RESERVED5
-
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 Modifier Constructor Description protected
RenderBox(int majorAxis, int minorAxis, StyleSheet styleSheet, InstanceID instanceId, BoxDefinition boxDefinition, ElementType elementType, ReportAttributeMap attributes, ReportStateKey stateKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(RenderNode child)
void
addChilds(RenderNode[] nodes)
void
addGeneratedChild(RenderNode child)
void
addGeneratedChilds(RenderNode[] nodes)
void
addOverflowArea(long width, long height)
void
apply()
void
clear()
Removes all children.void
close()
void
commit()
RenderBox
create(StyleSheet styleSheet)
protected void
decreaseContentReferenceCount(int count, RenderNode source)
The content-ref-count counts inline-subreports.protected void
decreaseDescendantCount(int count, RenderNode source)
The content-ref-count counts table-render-boxes.protected void
decreaseTableReferenceCount(int count, RenderNode source)
The content-ref-count counts table-render-boxes.RenderNode
derive(boolean deepDerive)
Derive creates a disconnected node that shares all the properties of the original node.RenderNode
deriveFrozen(boolean deepDerive)
Derive creates a disconnected node that shares all the properties of the original node.long
extendHeight(RenderNode child, long heightOffset)
Notifies a box that one of its childs has extended its height.protected long
extendHeightInBlockMode(RenderNode child, long heightOffset)
protected long
extendHeightInRowMode(RenderNode child, long heightOffset)
Match the y2 of the child with the y2 of the parent.RenderNode
findNodeById(InstanceID instanceId)
void
freeze()
int
getAppliedContentRefCount()
ExtendedBaselineInfo
getBaselineInfo()
BoxDefinition
getBoxDefinition()
int
getChildCount()
long
getContentAge()
long
getContentAreaX1()
long
getContentAreaX2()
Boolean
getContentBox()
int
getContentRefCount()
The content-ref-count counts inline-subreports.int
getDescendantCount()
long
getEffectiveMinimumChunkSize()
RenderNode
getFirstChild()
long
getInsets()
long
getInsetsLeft()
long
getInsetsRight()
RenderNode
getLastChild()
RenderBox.BreakIndicator
getManualBreakIndicator()
String
getName()
long
getOrphanConstraintSize()
int
getOrphanLeafCount()
long
getOverflowAreaHeight()
long
getOverflowAreaWidth()
int
getParentWidowContexts()
long
getPinned()
ReportStateKey
getProcessKeyCached()
long
getProcessKeyStepAge()
Object
getRawValue()
RenderBox.RestrictFinishClearOut
getRestrictFinishedClearOut()
ReportStateKey
getStateKey()
StaticBoxLayoutProperties
getStaticBoxLayoutProperties()
long
getStaticBoxPropertiesAge()
Object
getTableExportState()
int
getTableRefCount()
long
getTableValidationAge()
RenderBox
getTextEllipseBox()
long
getVerticalInsets()
long
getWidowConstraintSize()
long
getWidowConstraintSizeWithKeepTogether()
int
getWidowLeafCount()
protected void
increaseContentReferenceCount(int count, RenderNode source)
The content-ref-count counts inline-subreports or delayed-construction areas like crosstab-header.protected void
increaseDescendantCount(int count, RenderNode source)
The content-ref-count counts inline-subreports.protected void
increaseTableReferenceCount(int count, RenderNode source)
The content-ref-count counts tables.boolean
isAcceptInlineBoxes()
boolean
isAppendable()
boolean
isAppliedOpen()
boolean
isAppliedSeen()
protected boolean
isBlockForPagebreakPurpose()
boolean
isBoxOverflowX()
boolean
isBoxOverflowY()
boolean
isBreakAfter()
boolean
isCommited()
boolean
isContainsReservedContent()
boolean
isContentRefHolder()
boolean
isDeepFinishedTable()
boolean
isDiscardable()
boolean
isEmpty()
boolean
isEmptyNodesHaveSignificance()
boolean
isInvalidWidowOrphanNode()
boolean
isMarkedOpen()
boolean
isMarkedSeen()
boolean
isOpen()
boolean
isOrphanLeaf()
boolean
isPinned()
boolean
isPreventPagination()
boolean
isProcessKeyCacheValid()
boolean
isProcessKeyFinish()
boolean
isRenderBox()
boolean
isSizeSpecifiesBorderBox()
void
markAsContentRefHolder()
void
markBoxSeen()
void
markPinned(long pinPosition)
void
remove(RenderNode child)
void
replaceChild(RenderNode old, RenderNode replacement)
void
replaceChilds(RenderNode old, RenderNode[] replacement)
void
resetCacheState(boolean deepDirty)
void
rollback(boolean deepDirty)
void
setBaselineInfo(ExtendedBaselineInfo baselineInfo)
void
setContainsReservedContent(boolean containsReservedContent)
void
setContentAge(long contentAge)
void
setContentAreaX1(long contentAreaX1)
void
setContentAreaX2(long contentAreaX2)
void
setContentBox(Boolean contentBox)
void
setDeepFinished(boolean deepFinished)
protected void
setFirstChild(RenderNode firstChild)
void
setInvalidWidowOrphanNode(boolean invalidWidowOrphanNode)
protected void
setLastChild(RenderNode lastChild)
void
setManualBreakIndicator(RenderBox.BreakIndicator manualBreakIndicator)
void
setMinimumChunkWidth(long minimumChunkWidth)
void
setName(String name)
protected void
setOpen(boolean open)
void
setOrphanConstraintSize(long orphanConstraintSize)
void
setOrphanLeafCount(int orphanLeafCount)
void
setOverflowAreaHeight(long overflowAreaHeight)
void
setOverflowAreaWidth(long overflowAreaWidth)
void
setParentWidowContexts(int parentWidowContexts)
void
setPreventPagination(boolean preventPagination)
void
setProcessKeyCached(ReportStateKey processKeyCached)
void
setRawValue(Object rawValue)
void
setRestrictFinishedClearOut(RenderBox.RestrictFinishClearOut restrictFinishedClearOut)
protected void
setStateKey(ReportStateKey stateKey)
void
setStaticBoxPropertiesAge(long staticBoxPropertiesAge)
void
setTableExportState(Object tableExportState)
void
setTableValidationAge(long tableValidationAge)
void
setTextEllipseBox(RenderBox textEllipseBox)
void
setWidowConstraintSize(long widowConstraintSize)
void
setWidowConstraintSizeWithKeepTogether(long widowConstraintSizeWithKeepTogether)
void
setWidowLeafCount(int widowLeafCount)
RenderBox
split(int axis)
Performs a simple split.String
toString()
protected void
updateChangeTracker()
boolean
useMinimumChunkWidth()
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.layout.model.RenderNode
clone, getApplyState, getAttributes, getCachedAge, getCachedHeight, getCachedWidth, getCachedX, getCachedX2, getCachedY, getCachedY2, getCacheState, getChangeTracker, getEffectiveMarginBottom, getEffectiveMarginTop, getElementType, getHeight, getInstanceId, getLayoutNodeType, getLayoutParent, getLinebreakAge, getLogicalPage, getMajorAxis, getMaximumBoxWidth, getMinimumChunkWidth, getMinorAxis, getNext, getNodeLayoutProperties, getNodeType, getParent, getPrev, getRowIndex, getStyleSheet, getValidateModelAge, getVerticalTextAlignment, getWidth, getX, getY, getY2, isBoxVisible, isBoxVisible, isCacheValid, isFinishedPaginate, isFinishedTable, isFlag, isFrozen, isIgnorableForRendering, isLinebreakCacheValid, isNodeVisible, isNodeVisible, isNodeVisible, isNodeVisible, isParanoidModelChecks, isValidateModelCacheValid, isValidateModelResult, isVirtualNode, isVisible, isWidowBox, markApplyStateDirty, reinit, resetValidateModelResult, setCachedAge, setCachedHeight, setCachedWidth, setCachedX, setCachedY, setFinishedPaginate, setFinishedTable, setFlag, setHeight, setLinebreakAge, setMaximumBoxWidth, setNext, setNextUnchecked, setParent, setPrev, setPrevUnchecked, setValidateModelResult, setVirtualNode, setWidowBox, setWidth, setX, setY, shift, shiftCached, updateCacheState
-
-
-
-
Field Detail
-
FLAG_BOX_TABLE_SECTION_RESERVED2
protected static final int FLAG_BOX_TABLE_SECTION_RESERVED2
- See Also:
- Constant Field Values
-
FLAG_BOX_TABLE_SECTION_RESERVED3
protected static final int FLAG_BOX_TABLE_SECTION_RESERVED3
- See Also:
- Constant Field Values
-
FLAG_BOX_TABLE_SECTION_RESERVED4
protected static final int FLAG_BOX_TABLE_SECTION_RESERVED4
- See Also:
- Constant Field Values
-
FLAG_BOX_TABLE_SECTION_RESERVED5
protected static final int FLAG_BOX_TABLE_SECTION_RESERVED5
- See Also:
- Constant Field Values
-
FLAG_BOX_INVALID_WIDOW_ORPHAN_NODE
protected static final int FLAG_BOX_INVALID_WIDOW_ORPHAN_NODE
- See Also:
- Constant Field Values
-
FLAG_BOX_CONTAINS_PRESERVED_CONTENT
protected static final int FLAG_BOX_CONTAINS_PRESERVED_CONTENT
- See Also:
- Constant Field Values
-
FLAG_BOX_TABLE_SECTION_RESERVED
protected static final int FLAG_BOX_TABLE_SECTION_RESERVED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RenderBox
protected RenderBox(int majorAxis, int minorAxis, StyleSheet styleSheet, InstanceID instanceId, BoxDefinition boxDefinition, ElementType elementType, ReportAttributeMap attributes, ReportStateKey stateKey)
-
-
Method Detail
-
create
public RenderBox create(StyleSheet styleSheet)
-
setParentWidowContexts
public void setParentWidowContexts(int parentWidowContexts)
-
getParentWidowContexts
public int getParentWidowContexts()
-
getDescendantCount
public int getDescendantCount()
- Overrides:
getDescendantCount
in classRenderNode
-
isContentRefHolder
public boolean isContentRefHolder()
-
markAsContentRefHolder
public void markAsContentRefHolder()
-
getRawValue
public Object getRawValue()
-
setRawValue
public void setRawValue(Object rawValue)
-
isSizeSpecifiesBorderBox
public boolean isSizeSpecifiesBorderBox()
- Overrides:
isSizeSpecifiesBorderBox
in classRenderNode
-
getTextEllipseBox
public RenderBox getTextEllipseBox()
-
setTextEllipseBox
public void setTextEllipseBox(RenderBox textEllipseBox)
-
getStateKey
public ReportStateKey getStateKey()
- Overrides:
getStateKey
in classRenderNode
-
setStateKey
protected void setStateKey(ReportStateKey stateKey)
-
getManualBreakIndicator
public RenderBox.BreakIndicator getManualBreakIndicator()
-
setManualBreakIndicator
public void setManualBreakIndicator(RenderBox.BreakIndicator manualBreakIndicator)
-
getBoxDefinition
public BoxDefinition getBoxDefinition()
-
getInsetsLeft
public long getInsetsLeft()
-
getInsetsRight
public long getInsetsRight()
-
getEffectiveMinimumChunkSize
public long getEffectiveMinimumChunkSize()
- Overrides:
getEffectiveMinimumChunkSize
in classRenderNode
-
getInsets
public long getInsets()
-
getFirstChild
public RenderNode getFirstChild()
-
setFirstChild
protected void setFirstChild(RenderNode firstChild)
-
getLastChild
public RenderNode getLastChild()
-
setLastChild
protected void setLastChild(RenderNode lastChild)
-
addGeneratedChild
public void addGeneratedChild(RenderNode child)
-
addChild
public void addChild(RenderNode child)
-
increaseContentReferenceCount
protected void increaseContentReferenceCount(int count, RenderNode source)
The content-ref-count counts inline-subreports or delayed-construction areas like crosstab-header.
-
increaseTableReferenceCount
protected void increaseTableReferenceCount(int count, RenderNode source)
The content-ref-count counts tables.
-
increaseDescendantCount
protected void increaseDescendantCount(int count, RenderNode source)
The content-ref-count counts inline-subreports.
-
decreaseContentReferenceCount
protected void decreaseContentReferenceCount(int count, RenderNode source)
The content-ref-count counts inline-subreports.
-
decreaseTableReferenceCount
protected void decreaseTableReferenceCount(int count, RenderNode source)
The content-ref-count counts table-render-boxes.
-
decreaseDescendantCount
protected void decreaseDescendantCount(int count, RenderNode source)
The content-ref-count counts table-render-boxes.
-
getContentRefCount
public int getContentRefCount()
The content-ref-count counts inline-subreports.- Overrides:
getContentRefCount
in classRenderNode
-
getTableRefCount
public int getTableRefCount()
- Overrides:
getTableRefCount
in classRenderNode
-
replaceChild
public void replaceChild(RenderNode old, RenderNode replacement)
-
replaceChilds
public void replaceChilds(RenderNode old, RenderNode[] replacement)
-
derive
public RenderNode derive(boolean deepDerive)
Derive creates a disconnected node that shares all the properties of the original node. The derived node will no longer have any parent, sibling, child or any other relationships with other nodes.- Overrides:
derive
in classRenderNode
- Returns:
-
deriveFrozen
public RenderNode deriveFrozen(boolean deepDerive)
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.- Overrides:
deriveFrozen
in classRenderNode
- Returns:
-
addChilds
public void addChilds(RenderNode[] nodes)
-
addGeneratedChilds
public void addGeneratedChilds(RenderNode[] nodes)
-
findNodeById
public RenderNode findNodeById(InstanceID instanceId)
- Overrides:
findNodeById
in classRenderNode
-
isAppendable
public boolean isAppendable()
-
clear
public void clear()
Removes all children.
-
updateChangeTracker
protected void updateChangeTracker()
- Overrides:
updateChangeTracker
in classRenderNode
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmpty
in classRenderNode
-
isDiscardable
public boolean isDiscardable()
- Overrides:
isDiscardable
in classRenderNode
-
close
public void close()
-
remove
public void remove(RenderNode child)
-
isOpen
public boolean isOpen()
- Overrides:
isOpen
in classRenderNode
-
setOpen
protected void setOpen(boolean open)
-
freeze
public void freeze()
- Overrides:
freeze
in classRenderNode
-
split
public RenderBox split(int axis)
Performs a simple split. This box will be altered to form the left/top side of the split, and a derived empty box will be returned, which makes up the right/bottom side. A split will only happen on inline-boxes during the line-break-step. In the ordinary layouting, splitting is not necesary.- Parameters:
axis
-- Returns:
-
getContentAreaX1
public long getContentAreaX1()
-
setContentAreaX1
public void setContentAreaX1(long contentAreaX1)
-
getContentAreaX2
public long getContentAreaX2()
-
setContentAreaX2
public void setContentAreaX2(long contentAreaX2)
-
getStaticBoxLayoutProperties
public StaticBoxLayoutProperties getStaticBoxLayoutProperties()
-
getBaselineInfo
public ExtendedBaselineInfo getBaselineInfo()
-
setBaselineInfo
public void setBaselineInfo(ExtendedBaselineInfo baselineInfo)
-
getName
public String getName()
- Overrides:
getName
in classRenderNode
-
setName
public void setName(String name)
-
isBreakAfter
public boolean isBreakAfter()
- Overrides:
isBreakAfter
in classRenderNode
-
getStaticBoxPropertiesAge
public long getStaticBoxPropertiesAge()
-
setStaticBoxPropertiesAge
public void setStaticBoxPropertiesAge(long staticBoxPropertiesAge)
-
commit
public void commit()
-
getAppliedContentRefCount
public int getAppliedContentRefCount()
-
isAppliedOpen
public boolean isAppliedOpen()
-
isAppliedSeen
public boolean isAppliedSeen()
-
isMarkedOpen
public boolean isMarkedOpen()
-
isMarkedSeen
public boolean isMarkedSeen()
-
markBoxSeen
public void markBoxSeen()
-
isCommited
public boolean isCommited()
-
rollback
public void rollback(boolean deepDirty)
-
resetCacheState
public void resetCacheState(boolean deepDirty)
-
isDeepFinishedTable
public boolean isDeepFinishedTable()
- Overrides:
isDeepFinishedTable
in classRenderNode
-
setDeepFinished
public void setDeepFinished(boolean deepFinished)
-
getContentAge
public long getContentAge()
-
setContentAge
public void setContentAge(long contentAge)
-
getContentBox
public Boolean getContentBox()
-
setContentBox
public void setContentBox(Boolean contentBox)
-
getTableExportState
public Object getTableExportState()
-
setTableExportState
public void setTableExportState(Object tableExportState)
-
markPinned
public void markPinned(long pinPosition)
-
isPinned
public boolean isPinned()
-
getPinned
public long getPinned()
-
setMinimumChunkWidth
public void setMinimumChunkWidth(long minimumChunkWidth)
- Overrides:
setMinimumChunkWidth
in classRenderNode
-
isBoxOverflowX
public boolean isBoxOverflowX()
- Overrides:
isBoxOverflowX
in classRenderNode
-
isBoxOverflowY
public boolean isBoxOverflowY()
- Overrides:
isBoxOverflowY
in classRenderNode
-
isEmptyNodesHaveSignificance
public boolean isEmptyNodesHaveSignificance()
-
isAcceptInlineBoxes
public boolean isAcceptInlineBoxes()
-
getTableValidationAge
public long getTableValidationAge()
-
setTableValidationAge
public void setTableValidationAge(long tableValidationAge)
-
useMinimumChunkWidth
public boolean useMinimumChunkWidth()
-
getOverflowAreaHeight
public long getOverflowAreaHeight()
- Overrides:
getOverflowAreaHeight
in classRenderNode
-
setOverflowAreaHeight
public void setOverflowAreaHeight(long overflowAreaHeight)
-
getOverflowAreaWidth
public long getOverflowAreaWidth()
- Overrides:
getOverflowAreaWidth
in classRenderNode
-
setOverflowAreaWidth
public void setOverflowAreaWidth(long overflowAreaWidth)
-
addOverflowArea
public void addOverflowArea(long width, long height)
-
apply
public void apply()
- Overrides:
apply
in classRenderNode
-
extendHeight
public long extendHeight(RenderNode child, long heightOffset)
Notifies a box that one of its childs has extended its height. The child's height property already contains the new height. Theamount
given is the offset from the old height to the new height, and is always a positive number.- Parameters:
child
-heightOffset
-
-
extendHeightInBlockMode
protected long extendHeightInBlockMode(RenderNode child, long heightOffset)
-
extendHeightInRowMode
protected long extendHeightInRowMode(RenderNode child, long heightOffset)
Match the y2 of the child with the y2 of the parent. If the box extends over the y2 of the parent, then extend the parent. If the parent has overflow-y, then we must not extend by more than heightOffset.- Parameters:
child
-heightOffset
-
-
getChildCount
public int getChildCount()
- Overrides:
getChildCount
in classRenderNode
-
getOrphanConstraintSize
public long getOrphanConstraintSize()
-
setOrphanConstraintSize
public void setOrphanConstraintSize(long orphanConstraintSize)
-
getWidowConstraintSize
public long getWidowConstraintSize()
-
setWidowConstraintSize
public void setWidowConstraintSize(long widowConstraintSize)
-
getWidowConstraintSizeWithKeepTogether
public long getWidowConstraintSizeWithKeepTogether()
-
setWidowConstraintSizeWithKeepTogether
public void setWidowConstraintSizeWithKeepTogether(long widowConstraintSizeWithKeepTogether)
-
isInvalidWidowOrphanNode
public boolean isInvalidWidowOrphanNode()
-
setInvalidWidowOrphanNode
public void setInvalidWidowOrphanNode(boolean invalidWidowOrphanNode)
-
getRestrictFinishedClearOut
public RenderBox.RestrictFinishClearOut getRestrictFinishedClearOut()
- Overrides:
getRestrictFinishedClearOut
in classRenderNode
-
setRestrictFinishedClearOut
public void setRestrictFinishedClearOut(RenderBox.RestrictFinishClearOut restrictFinishedClearOut)
-
isBlockForPagebreakPurpose
protected boolean isBlockForPagebreakPurpose()
-
isOrphanLeaf
public boolean isOrphanLeaf()
- Overrides:
isOrphanLeaf
in classRenderNode
-
getVerticalInsets
public long getVerticalInsets()
-
isContainsReservedContent
public boolean isContainsReservedContent()
- Overrides:
isContainsReservedContent
in classRenderNode
-
setContainsReservedContent
public void setContainsReservedContent(boolean containsReservedContent)
-
isPreventPagination
public boolean isPreventPagination()
-
setPreventPagination
public void setPreventPagination(boolean preventPagination)
-
isRenderBox
public boolean isRenderBox()
- Overrides:
isRenderBox
in classRenderNode
-
setProcessKeyCached
public void setProcessKeyCached(ReportStateKey processKeyCached)
-
getProcessKeyStepAge
public long getProcessKeyStepAge()
-
getProcessKeyCached
public ReportStateKey getProcessKeyCached()
-
isProcessKeyFinish
public boolean isProcessKeyFinish()
-
isProcessKeyCacheValid
public boolean isProcessKeyCacheValid()
-
getOrphanLeafCount
public int getOrphanLeafCount()
- Overrides:
getOrphanLeafCount
in classRenderNode
-
setOrphanLeafCount
public void setOrphanLeafCount(int orphanLeafCount)
-
getWidowLeafCount
public int getWidowLeafCount()
- Overrides:
getWidowLeafCount
in classRenderNode
-
setWidowLeafCount
public void setWidowLeafCount(int widowLeafCount)
-
-