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 |
|---|---|
String |
getAttribute(String name)
Obtains a value of an additional attribute.
|
Map<String,String> |
getAttributes()
Obtains the names and values of all the box attributes.
|
Rectangular |
getBounds()
Returns the logical bounds of the box node.
|
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.
|
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.
|
int |
getSourceNodeId()
Obtains a unique identification of the box source (e.g. the source DOM node).
|
String |
getTagName()
When the box is generated by a DOM element, obtains the corresponding tag name.
|
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, getBorderStyle, getBottomBorder, getFontSize, getFontStyle, getFontWeight, getId, getLeftBorder, getLineThrough, getPage, getRightBorder, getTopBorder, getUnderline, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparatedBox getParentBox()
null when this is the root box.Box getChildBox(int index) throws ArrayIndexOutOfBoundsException
index - the child indexArrayIndexOutOfBoundsExceptionint getChildCount()
Color getColor()
String getFontFamily()
String getText()
ContentObject getContentObject()
null when there is no object contained.Rectangular getBounds()
getBounds in interface ContentRectRectangular getContentBounds()
Rectangular getVisualBounds()
boolean isVisible()
true when the box is visibleBox.Type getType()
int getSourceNodeId()
String getTagName()
null for boxes that do not correspond to a DOM element.String getAttribute(String name)
class or href.name - the attribute namenull if the value is not specified.Map<String,String> getAttributes()
class or href.Box.DisplayType getDisplayType()
Copyright © 2018. All rights reserved.