org.jfree.layouting.renderer.model

Class ParagraphRenderBox

Implemented Interfaces:
Cloneable

public class ParagraphRenderBox
extends BlockRenderBox

This articifial renderbox is the connection between block-contexts and the sequences of consectual inline-boxes of that block.

This renderbox generates lineboxes whenever needed.

When asked for layout-sizes or when doing the layouting, it first checks its validity and performs splits on all forced pagebreaks. At the end, there is no inner element's edge with an activated clear-property.

After that, it generates temporary lineboxes for all of its childs. When *re*-computing the layout, these lineboxes get invalidated and merged back into the paragraph.

Author:
Thomas Morgner

Field Summary

Fields inherited from class org.jfree.layouting.renderer.model.RenderBox

LOG_PRUNE

Fields inherited from class org.jfree.layouting.renderer.model.RenderNode

HORIZONTAL_AXIS, VERTICAL_AXIS

Constructor Summary

ParagraphRenderBox(BoxDefinition boxDefinition)

Method Summary

void
addChild(RenderNode child)
protected void
addDirectly(RenderNode child)
void
appyStyle(LayoutContext context, OutputProcessorMetaData metaData)
void
clear()
Removes all children.
void
clearLayout()
RenderNode
derive(boolean deepDerive)
Derive creates a disconnected node that shares all the properties of the original node.
RenderNode
findNodeById(Object instanceId)
RenderBox
getInsertationPoint()
Object
getInstanceId()
The public-id for the paragraph is the pool-box.
CSSValue
getLastLineAlignment()
long
getLineBoxAge()
BlockRenderBox
getLineboxContainer()
long
getMajorLayoutAge()
long
getMinorLayoutAge()
InlineRenderBox
getPool()
CSSValue
getTextAlignment()
RenderNode
hibernate()
Derive creates a disconnected node that shares all the properties of the original node.
boolean
isAppendable()
boolean
isDiscardable()
boolean
isEmpty()
void
setLineBoxAge(long lineBoxAge)
void
setMajorLayoutAge(long majorLayoutAge)
void
setMinorLayoutAge(long minorLayoutAge)

Methods inherited from class org.jfree.layouting.renderer.model.RenderBox

addChild, addChilds, addGeneratedChild, appyStyle, clear, clone, close, derive, deriveFrozen, findNodeById, freeze, getBaselineInfo, getBorder, getBoxDefinition, getBoxLayoutProperties, getContentAreaX1, getContentAreaX2, getDominantBaseline, getEffectiveMarginBottom, getEffectiveMarginTop, getFirstChild, getInsertationPoint, getLastChild, getLineCount, getNominalBaselineInfo, getOrphans, getOrphansSize, getPageContext, getStaticBoxLayoutProperties, getVisibleFirst, getVisibleLast, getWidows, getWidowsSize, hibernate, insertAfter, insertBefore, isAppendable, isAvoidPagebreakInside, isDiscardable, isEmpty, isOpen, isPreserveSpace, remove, replaceChild, replaceChilds, setBaselineInfo, setContentAreaX1, setContentAreaX2, setFirstChild, setLastChild, setLineCount, setOrphansSize, setPageContext, setWidowsSize, split

Methods inherited from class org.jfree.layouting.renderer.model.RenderNode

appyStyle, clone, derive, deriveFrozen, findNodeById, freeze, getAlignmentAdjust, getAlignmentAdjustResolved, getAlignmentBaseline, getBaselineShift, getBaselineShiftResolved, getChangeTracker, getComputedLayoutProperties, getDimension, getEffectiveMarginBottom, getEffectiveMarginTop, getHeight, getInstanceId, getLayoutContext, getLogicalPage, getMajorAxis, getMaximumBoxWidth, getMinimumChunkWidth, getMinorAxis, getNamespace, getNext, getNodeLayoutProperties, getNormalFlow, getPageContext, getParent, getParentBlockContext, getPosition, getPrev, getStickyMarker, getTagName, getVerticalAlignment, getVisibleNext, getVisiblePrev, getWidth, getX, getY, hibernate, isDirectionLTR, isDirty, isDiscardable, isEmpty, isFrozen, isHibernated, isIcmMetricsFinished, isIgnorableForRendering, isOpen, normalizeAlignment, setComputedLayoutProperties, setDimension, setDirty, setHeight, setHibernated, setIcmMetricsFinished, setMajorAxis, setMaximumBoxWidth, setMinimumChunkWidth, setMinorAxis, setNext, setParent, setPosition, setPrev, setStickyMarker, setWidth, setX, setY, updateChangeTracker

Constructor Details

ParagraphRenderBox

public ParagraphRenderBox(BoxDefinition boxDefinition)

Method Details

addChild

public final void addChild(RenderNode child)
Overrides:
addChild in interface RenderBox

addDirectly

protected void addDirectly(RenderNode child)

appyStyle

public void appyStyle(LayoutContext context,
                      OutputProcessorMetaData metaData)
Overrides:
appyStyle in interface RenderBox

clear

public final void clear()
Removes all children.
Overrides:
clear in interface RenderBox

clearLayout

public final void clearLayout()

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, silbling, child or any other relationships with other nodes.
Overrides:
derive in interface RenderBox
Returns:

findNodeById

public RenderNode findNodeById(Object instanceId)
Overrides:
findNodeById in interface RenderBox

getInsertationPoint

public RenderBox getInsertationPoint()
Overrides:
getInsertationPoint in interface RenderBox

getInstanceId

public Object getInstanceId()
The public-id for the paragraph is the pool-box.
Overrides:
getInstanceId in interface RenderNode
Returns:

getLastLineAlignment

public CSSValue getLastLineAlignment()

getLineBoxAge

public long getLineBoxAge()

getLineboxContainer

public BlockRenderBox getLineboxContainer()

getMajorLayoutAge

public long getMajorLayoutAge()

getMinorLayoutAge

public long getMinorLayoutAge()

getPool

public InlineRenderBox getPool()

getTextAlignment

public CSSValue getTextAlignment()

hibernate

public RenderNode hibernate()
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:
hibernate in interface RenderBox
Returns:

isAppendable

public boolean isAppendable()
Overrides:
isAppendable in interface RenderBox

isDiscardable

public boolean isDiscardable()
Overrides:
isDiscardable in interface RenderBox

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in interface RenderBox

setLineBoxAge

public void setLineBoxAge(long lineBoxAge)

setMajorLayoutAge

public void setMajorLayoutAge(long majorLayoutAge)

setMinorLayoutAge

public void setMinorLayoutAge(long minorLayoutAge)