A render-box corresponds to elements in a DOM tree.
Each box has a size, paddings, margins and borders. Boxes may have one or more childs.
While all nodes may have a position or dimensions, boxes are special, as they can have borders, margins and paddings.
Borders, paddings and margins can have percentages, the margins can additionally be 'auto'.
The StrictInset variables for these properties contain the resolved values, while the box-definition contain the
unresolved values. The resolve values are not valid unless the object has been validated to least least 'LAYOUTING'.
addChilds
public void addChilds(RenderNode[] nodes)
addGeneratedChild
public void addGeneratedChild(RenderNode child)
clear
public void clear()
Removes all children.
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.
- clone in interface RenderNode
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.
- derive in interface RenderNode
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.
- deriveFrozen in interface RenderNode
getBorder
public Border getBorder()
getContentAreaX1
public long getContentAreaX1()
getContentAreaX2
public long getContentAreaX2()
getDominantBaseline
public CSSValue getDominantBaseline()
getInsertationPoint
public RenderBox getInsertationPoint()
getLineCount
public int getLineCount()
getOrphans
public int getOrphans()
getOrphansSize
public long getOrphansSize()
getVisibleFirst
public RenderNode getVisibleFirst()
getWidows
public int getWidows()
getWidowsSize
public long getWidowsSize()
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.
- hibernate in interface RenderNode
insertAfter
protected void insertAfter(RenderNode node,
RenderNode target)
Inserts the given target after the specified node. If the node is null, the target is inserted as first node.
insertBefore
protected void insertBefore(RenderNode node,
RenderNode target)
Inserts the given target directly before the the specified node. If the node is null, the element is inserted at
the last position.
isAppendable
public boolean isAppendable()
isAvoidPagebreakInside
public boolean isAvoidPagebreakInside()
isPreserveSpace
public boolean isPreserveSpace()
setContentAreaX1
public void setContentAreaX1(long contentAreaX1)
setContentAreaX2
public void setContentAreaX2(long contentAreaX2)
setFirstChild
protected void setFirstChild(RenderNode firstChild)
setLastChild
protected void setLastChild(RenderNode lastChild)
setLineCount
public void setLineCount(int lineCount)
setOrphansSize
public void setOrphansSize(long orphansSize)
setPageContext
public void setPageContext(PageContext pageContext)
setWidowsSize
public void setWidowsSize(long widowsSize)
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.