public interface Box extends ContentRect
Modifier and Type | Interface and Description |
---|---|
static class |
Box.DisplayType
CSS Display Type
|
static class |
Box.Type
The type of the box.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute(java.lang.String name)
Obtains a value of an additional attribute.
|
Border |
getBorderStyle(Border.Side side)
Obtains the properties of the box border at the given side.
|
Rectangular |
getBounds()
Returns the logical bounds of the box node.
|
java.awt.Color |
getColor()
Obtains the box text color.
|
Rectangular |
getContentBounds()
Returns the content bounds.
|
ContentObject |
getContentObject()
Obtains the content object contained in this box.
|
Box.DisplayType |
getDisplayType()
Obtains the display type of the element according to the CSS display: property.
|
java.lang.String |
getFontFamily()
Obtains the font family name used by the box.
|
Box |
getChildBox(int index)
Obtains the n-th child box.
|
int |
getChildCount()
Returns the number of child boxes for this box.
|
Box |
getParentBox()
Obtains the parent box of this box.
|
java.lang.String |
getTagName()
When the box is generated by a DOM element, obtains the corresponding tag name.
|
java.lang.String |
getText()
Obtains the complete text contained in this box.
|
Box.Type |
getType()
Resurns the type of the box.
|
Rectangular |
getVisualBounds()
Returns the bounds of the box as they visually appear to the user.
|
boolean |
isVisible()
Checks whether the box is visible.
|
getBackgroundColor, getBorderCount, getBottomBorder, getFontSize, getFontStyle, getFontWeight, getId, getLeftBorder, getLineThrough, getPage, getRightBorder, getTopBorder, getUnderline, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparated
Box getParentBox()
null
when this is the root box.Box getChildBox(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- the child indexjava.lang.ArrayIndexOutOfBoundsException
int getChildCount()
java.awt.Color getColor()
java.lang.String getFontFamily()
java.lang.String getText()
ContentObject getContentObject()
null
when there is no object contained.Border getBorderStyle(Border.Side side)
side
- the border side.Rectangular getBounds()
getBounds
in interface ContentRect
Rectangular getContentBounds()
Rectangular getVisualBounds()
boolean isVisible()
true
when the box is visibleBox.Type getType()
java.lang.String getTagName()
null
for boxes that do not correspond to a DOM element.java.lang.String getAttribute(java.lang.String name)
class
or href
.name
- the attribute namenull
if the value is not specified.Box.DisplayType getDisplayType()