Class BoxImpl
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.DefaultTreeNode<T>
-
- cz.vutbr.fit.layout.impl.DefaultTreeContentRect<Box>
-
- cz.vutbr.fit.layout.impl.DefaultBox
-
- cz.vutbr.fit.layout.puppeteer.impl.BoxImpl
-
- All Implemented Interfaces:
Box
,ContentRect
,GenericTreeNode<Box>
,Rect
public class BoxImpl extends DefaultBox
A standard box implementation extended by additional properties necessary for building the resulting tree correctly.- Author:
- burgetr
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.vutbr.fit.layout.model.Box
Box.DisplayType, Box.Type
-
-
Field Summary
-
Fields inherited from interface cz.vutbr.fit.layout.model.ContentRect
ATTR_SAME_AS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyIntrinsicBounds()
Applies the intrinsic bounds as the initial content bounds.BoxImpl
getClipBox()
Finds the nearest ancestor that may clip the contents of this box (it has the 'overflow' value different from 'visible');BoxImpl
getDomParent()
Rectangular
getIntrinsicBounds()
Returns the bounds of the box as obtained from the renderer.TextStyle
getIntrinsicTextStyle()
BoxImpl
getOffsetParent()
BoxList
getParentList()
boolean
isAbsolute()
boolean
isClipping()
boolean
isFixed()
void
setAbsolute(boolean absolute)
void
setClipping(boolean clipping)
void
setDomParent(BoxImpl domParent)
void
setFixed(boolean fixed)
void
setIntrinsicBounds(Rectangular intrinsicBounds)
void
setIntrinsicTextStyle(TextStyle intrinsicTextStyle)
void
setOffsetParent(BoxImpl offsetParent)
-
Methods inherited from class cz.vutbr.fit.layout.impl.DefaultBox
getAttribute, getAttributes, getColor, getContentBounds, getContentObject, getDisplayType, getFontFamily, getHeight, getIntrinsicParent, getOrder, getOwnText, getSourceNodeId, getSubstringBounds, getTagName, getText, getText, getType, getVisualBounds, getWidth, getX1, getX2, getY1, getY2, isVisible, isVisuallySeparated, move, recomputeTextStyle, removeAttribute, setAttribute, setColor, setContentBounds, setContentObject, setDisplayType, setFontFamily, setIntrinsicParent, setOrder, setOwnText, setSourceNodeId, setTagName, setType, setVisible, setVisualBounds, toString
-
Methods inherited from class cz.vutbr.fit.layout.impl.DefaultTreeContentRect
addUserAttribute, equals, getBackgroundColor, getBackgroundImagePng, getBorderCount, getBorderStyle, getBottomBorder, getBounds, getId, getLeftBorder, getLine, getPageIri, getRightBorder, getTextStyle, getTopBorder, getUserAttribute, hasBackground, hasBottomBorder, hashCode, hasLeftBorder, hasRightBorder, hasTopBorder, childrenChanged, isBackgroundSeparated, setBackgroundColor, setBackgroundImagePng, setBackgroundSeparated, setBorderStyle, setBounds, setId, setLine, setPageIri, setTextStyle
-
Methods inherited from class cz.vutbr.fit.layout.impl.DefaultTreeNode
appendChild, appendChildren, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSibling, getParent, getPreviousSibling, getRoot, insertChild, isLeaf, isRoot, removeAllChildren, removeChild, removeChild, setParent, setRoot
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cz.vutbr.fit.layout.model.ContentRect
addUserAttribute, getBackgroundColor, getBackgroundImagePng, getBorderCount, getBorderStyle, getBottomBorder, getId, getLeftBorder, getLine, getPageIri, getRightBorder, getTextStyle, getTopBorder, getUserAttribute, hasBackground, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparated, setBackgroundSeparated, setBounds, setLine
-
Methods inherited from interface cz.vutbr.fit.layout.model.GenericTreeNode
appendChild, appendChildren, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSibling, getParent, getPreviousSibling, getRoot, childrenChanged, insertChild, isLeaf, isRoot, removeAllChildren, removeChild, removeChild, setParent, setRoot
-
-
-
-
Constructor Detail
-
BoxImpl
public BoxImpl(BoxList parentList)
-
-
Method Detail
-
getParentList
public BoxList getParentList()
-
getOffsetParent
public BoxImpl getOffsetParent()
-
setOffsetParent
public void setOffsetParent(BoxImpl offsetParent)
-
getDomParent
public BoxImpl getDomParent()
-
setDomParent
public void setDomParent(BoxImpl domParent)
-
isAbsolute
public boolean isAbsolute()
-
setAbsolute
public void setAbsolute(boolean absolute)
-
isFixed
public boolean isFixed()
-
setFixed
public void setFixed(boolean fixed)
-
isClipping
public boolean isClipping()
-
setClipping
public void setClipping(boolean clipping)
-
getIntrinsicTextStyle
public TextStyle getIntrinsicTextStyle()
-
setIntrinsicTextStyle
public void setIntrinsicTextStyle(TextStyle intrinsicTextStyle)
-
getIntrinsicBounds
public Rectangular getIntrinsicBounds()
Returns the bounds of the box as obtained from the renderer. This should correspond to the border bounds of the box in the CSS terminology. This value is used when a box tree is being constructed from individual boxes obtained from the renderer (e.g. usingBaseBoxTreeBuilder
).- Returns:
- the intrinsic bounds of the box
-
setIntrinsicBounds
public void setIntrinsicBounds(Rectangular intrinsicBounds)
-
applyIntrinsicBounds
public void applyIntrinsicBounds()
Applies the intrinsic bounds as the initial content bounds.
-
getClipBox
public BoxImpl getClipBox()
Finds the nearest ancestor that may clip the contents of this box (it has the 'overflow' value different from 'visible');- Returns:
- an ancestor box used for clipping or
null
when there is no such box
-
-