public class DefaultBox extends DefaultContentRect implements Box
Box.DisplayType, Box.Type| Constructor and Description |
|---|
DefaultBox() |
| 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.
|
int |
getBottomBorder()
Obtains the bottom border width.
|
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.
|
int |
getHeight() |
Box |
getChildBox(int index)
Obtains the n-th child box.
|
int |
getLeftBorder()
Obtains the left border width.
|
Box |
getParentBox()
Obtains the parent box of this box.
|
int |
getRightBorder()
Obtains the right border width.
|
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.
|
int |
getTopBorder()
Obtains the top border width.
|
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(java.lang.String name) |
void |
setAttribute(java.lang.String name,
java.lang.String value) |
void |
setBorderStyle(Border.Side side,
Border style) |
void |
setBottomBorder(int width) |
void |
setColor(java.awt.Color color) |
void |
setContentBounds(Rectangular contentBounds) |
void |
setContentObject(ContentObject contentObject) |
void |
setDisplayType(Box.DisplayType displayType) |
void |
setFontFamily(java.lang.String fontFamily) |
void |
setLeftBorder(int width) |
void |
setRightBorder(int width) |
void |
setTagName(java.lang.String tagName) |
void |
setText(java.lang.String text) |
void |
setTopBorder(int width) |
void |
setType(Box.Type type) |
void |
setVisible(boolean visible) |
void |
setVisualBounds(Rectangular visualBounds) |
getBackgroundColor, getBorderCount, getBounds, getFontSize, getFontStyle, getFontWeight, getId, getLineThrough, getPage, getUnderline, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparated, setBackgroundColor, setBackgroundSeparated, setBorders, setBounds, setFontSize, setFontStyle, setFontWeight, setId, setLineThrough, setPage, setUnderlineadd, addAttribute, getAttribute, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSiblingNode, getParent, getPreviousSiblingNode, getRoot, insert, isLeaf, isRoot, remove, remove, removeAllChildrenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBounds, getChildCountgetBackgroundColor, getBorderCount, getFontSize, getFontStyle, getFontWeight, getId, getLineThrough, getPage, 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 java.awt.Color getColor()
Boxpublic void setColor(java.awt.Color color)
public java.lang.String getFontFamily()
BoxgetFontFamily in interface Boxpublic void setFontFamily(java.lang.String fontFamily)
public java.lang.String getText()
Boxpublic void setText(java.lang.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 java.lang.String getTagName()
BoxgetTagName in interface Boxnull for boxes that do not correspond to a DOM element.public void setTagName(java.lang.String tagName)
public java.lang.String getAttribute(java.lang.String name)
Boxclass or href.getAttribute in interface Boxname - the attribute namenull if the value is not specified.public void setAttribute(java.lang.String name,
java.lang.String value)
public void removeAttribute(java.lang.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 DefaultContentRectpublic Border getBorderStyle(Border.Side side)
BoxgetBorderStyle in interface Boxside - the border side.public void setBorderStyle(Border.Side side, Border style)
public int getTopBorder()
ContentRectgetTopBorder in interface ContentRectgetTopBorder in class DefaultContentRectpublic void setTopBorder(int width)
setTopBorder in class DefaultContentRectpublic int getBottomBorder()
ContentRectgetBottomBorder in interface ContentRectgetBottomBorder in class DefaultContentRectpublic void setBottomBorder(int width)
setBottomBorder in class DefaultContentRectpublic int getLeftBorder()
ContentRectgetLeftBorder in interface ContentRectgetLeftBorder in class DefaultContentRectpublic void setLeftBorder(int width)
setLeftBorder in class DefaultContentRectpublic int getRightBorder()
ContentRectgetRightBorder in interface ContentRectgetRightBorder in class DefaultContentRectpublic void setRightBorder(int width)
setRightBorder in class DefaultContentRect