public class DefaultBox extends DefaultContentRect implements Box
Box.DisplayType, Box.Type| Constructor and Description |
|---|
DefaultBox() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(String name)
Obtains a value of an additional attribute.
|
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.
|
int |
getHeight() |
Box |
getChildBox(int index)
Obtains the n-th child box.
|
Box |
getParentBox()
Obtains the parent box of this box.
|
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.
|
int |
getWidth() |
int |
getX1() |
int |
getX2() |
int |
getY1() |
int |
getY2() |
boolean |
isVisible()
Checks whether the box is visible.
|
void |
removeAttribute(String name) |
void |
setAttribute(String name,
String value) |
void |
setColor(Color color) |
void |
setContentBounds(Rectangular contentBounds) |
void |
setContentObject(ContentObject contentObject) |
void |
setDisplayType(Box.DisplayType displayType) |
void |
setFontFamily(String fontFamily) |
void |
setTagName(String tagName) |
void |
setText(String text) |
void |
setType(Box.Type type) |
void |
setVisible(boolean visible) |
void |
setVisualBounds(Rectangular visualBounds) |
getBackgroundColor, getBorderCount, getBottomBorder, getBounds, getFontSize, getFontStyle, getFontWeight, getId, getLeftBorder, getLineThrough, getPage, getRightBorder, getTopBorder, getUnderline, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparated, setBackgroundColor, setBackgroundSeparated, setBorders, setBottomBorder, setBounds, setFontSize, setFontStyle, setFontWeight, setId, setLeftBorder, setLineThrough, setPage, setRightBorder, setTopBorder, setUnderlineadd, getDepth, getChildAt, getChildCount, getChildren, getIndex, getNextSiblingNode, getParent, getPreviousSiblingNode, getRoot, insert, isLeaf, isRoot, remove, remove, removeAllChildrenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBounds, getChildCountgetBackgroundColor, getBorderCount, getBottomBorder, getFontSize, getFontStyle, getFontWeight, getId, getLeftBorder, getLineThrough, getPage, getRightBorder, getTopBorder, getUnderline, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparatedpublic Box getChildBox(int index)
BoxgetChildBox in interface Boxindex - the child indexpublic Box getParentBox()
BoxgetParentBox in interface Boxnull when this is the root box.public boolean isVisible()
Boxpublic void setVisible(boolean visible)
public void setColor(Color color)
public String getFontFamily()
BoxgetFontFamily in interface Boxpublic void setFontFamily(String fontFamily)
public String getText()
Boxpublic void setText(String text)
public ContentObject getContentObject()
BoxgetContentObject in interface Boxnull when there is no object contained.public void setContentObject(ContentObject contentObject)
public Rectangular getContentBounds()
BoxgetContentBounds in interface Boxpublic void setContentBounds(Rectangular contentBounds)
public Rectangular getVisualBounds()
BoxgetVisualBounds in interface Boxpublic void setVisualBounds(Rectangular visualBounds)
public String getTagName()
BoxgetTagName in interface Boxnull for boxes that do not correspond to a DOM element.public void setTagName(String tagName)
public String getAttribute(String name)
Boxclass or href.getAttribute in interface Boxname - the attribute namenull if the value is not specified.public void removeAttribute(String name)
public Box.Type getType()
Boxpublic void setType(Box.Type type)
public Box.DisplayType getDisplayType()
BoxgetDisplayType in interface Boxpublic void setDisplayType(Box.DisplayType displayType)
public int getX1()
getX1 in interface RectgetX1 in class DefaultContentRectpublic int getY1()
getY1 in interface RectgetY1 in class DefaultContentRectpublic int getX2()
getX2 in interface RectgetX2 in class DefaultContentRectpublic int getY2()
getY2 in interface RectgetY2 in class DefaultContentRectpublic int getWidth()
getWidth in interface RectgetWidth in class DefaultContentRectpublic int getHeight()
getHeight in interface RectgetHeight in class DefaultContentRectCopyright © 2015. All rights reserved.