org.jfree.layouting.renderer.model
Class ParagraphRenderBox

java.lang.Object
  extended by org.jfree.layouting.renderer.model.RenderNode
      extended by org.jfree.layouting.renderer.model.RenderBox
          extended by org.jfree.layouting.renderer.model.BlockRenderBox
              extended by org.jfree.layouting.renderer.model.ParagraphRenderBox
All Implemented Interfaces:
java.lang.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(java.lang.Object instanceId)
           
 RenderBox getInsertationPoint()
           
 java.lang.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
addChilds, addGeneratedChild, clone, close, deriveFrozen, freeze, getBaselineInfo, getBorder, getBoxDefinition, getBoxLayoutProperties, getContentAreaX1, getContentAreaX2, getDominantBaseline, getEffectiveMarginBottom, getEffectiveMarginTop, getFirstChild, getLastChild, getLineCount, getNominalBaselineInfo, getOrphans, getOrphansSize, getPageContext, getStaticBoxLayoutProperties, getVisibleFirst, getVisibleLast, getWidows, getWidowsSize, insertAfter, insertBefore, isAvoidPagebreakInside, 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
getAlignmentAdjust, getAlignmentAdjustResolved, getAlignmentBaseline, getBaselineShift, getBaselineShiftResolved, getChangeTracker, getComputedLayoutProperties, getDimension, getHeight, getLayoutContext, getLogicalPage, getMajorAxis, getMaximumBoxWidth, getMinimumChunkWidth, getMinorAxis, getNamespace, getNext, getNodeLayoutProperties, getNormalFlow, getParent, getParentBlockContext, getPosition, getPrev, getStickyMarker, getTagName, getVerticalAlignment, getVisibleNext, getVisiblePrev, getWidth, getX, getY, isDirectionLTR, isDirty, isFrozen, isHibernated, isIcmMetricsFinished, isIgnorableForRendering, normalizeAlignment, setComputedLayoutProperties, setDimension, setDirty, setHeight, setHibernated, setIcmMetricsFinished, setMajorAxis, setMaximumBoxWidth, setMinimumChunkWidth, setMinorAxis, setNext, setParent, setPosition, setPrev, setStickyMarker, setWidth, setX, setY, updateChangeTracker
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParagraphRenderBox

public ParagraphRenderBox(BoxDefinition boxDefinition)
Method Detail

appyStyle

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

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 class RenderBox
Returns:

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 class RenderBox
Returns:

addChild

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

addDirectly

protected void addDirectly(RenderNode child)

clear

public final void clear()
Removes all children.

Overrides:
clear in class RenderBox

clearLayout

public final void clearLayout()

getInsertationPoint

public RenderBox getInsertationPoint()
Overrides:
getInsertationPoint in class RenderBox

isAppendable

public boolean isAppendable()
Overrides:
isAppendable in class RenderBox

findNodeById

public RenderNode findNodeById(java.lang.Object instanceId)
Overrides:
findNodeById in class RenderBox

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class RenderBox

isDiscardable

public boolean isDiscardable()
Overrides:
isDiscardable in class RenderBox

getLastLineAlignment

public CSSValue getLastLineAlignment()

getTextAlignment

public CSSValue getTextAlignment()

getLineboxContainer

public BlockRenderBox getLineboxContainer()

getPool

public InlineRenderBox getPool()

getLineBoxAge

public long getLineBoxAge()

setLineBoxAge

public void setLineBoxAge(long lineBoxAge)

getMinorLayoutAge

public long getMinorLayoutAge()

setMinorLayoutAge

public void setMinorLayoutAge(long minorLayoutAge)

getMajorLayoutAge

public long getMajorLayoutAge()

setMajorLayoutAge

public void setMajorLayoutAge(long majorLayoutAge)

getInstanceId

public java.lang.Object getInstanceId()
The public-id for the paragraph is the pool-box.

Overrides:
getInstanceId in class RenderNode
Returns: