public class DefaultContentRect extends GenericTreeNode implements ContentRect
DefaultBox
and DefaultArea
subclasses
should be used instead.Constructor and Description |
---|
DefaultContentRect() |
DefaultContentRect(DefaultContentRect src) |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackgroundColor()
Obtains the background color of the area.
|
int |
getBorderCount()
Obtains the number of defined borders for the box.
|
int |
getBottomBorder()
Obtains the bottom border width.
|
Rectangular |
getBounds()
Obtains the pixel position within in the page.
|
float |
getFontSize()
Obtains an average font size in the are in pixels.
|
float |
getFontStyle()
Obtains the average font style. 0 means no text in italics, 1 means all the text in italics.
|
float |
getFontWeight()
Obtains the average font style. 0 means no text is bold, 1 means all the text is bold
|
int |
getHeight() |
int |
getId()
Obtains a unique ID of the area within the page.
|
int |
getLeftBorder()
Obtains the left border width.
|
float |
getLineThrough()
Obtains the amount of line-through text. 0 means no underlined text, 1 means all the text is underlined.
|
Page |
getPage()
Obtains the page this block belongs to.
|
int |
getRightBorder()
Obtains the right border width.
|
int |
getTopBorder()
Obtains the top border width.
|
float |
getUnderline()
Obtains the amount of underlined text. 0 means no underlined text, 1 means all the text is underlined.
|
int |
getWidth() |
int |
getX1() |
int |
getX2() |
int |
getY1() |
int |
getY2() |
boolean |
hasBottomBorder()
Checks whether the box has the bottom border defined.
|
boolean |
hasLeftBorder()
Checks whether the box has the left border defined.
|
boolean |
hasRightBorder()
Checks whether the box has right top border defined.
|
boolean |
hasTopBorder()
Checks whether the box has the top border defined.
|
boolean |
isBackgroundSeparated()
Checks whether the box is separated by background, i.e. its background color is not transparent
and it is different from the ancestor background.
|
void |
setBackgroundColor(java.awt.Color backgroundColor) |
void |
setBackgroundSeparated(boolean backgroundSeparated) |
void |
setBorders(int top,
int right,
int bottom,
int left)
Sets all the border values.
|
void |
setBottomBorder(int bottomBorder) |
void |
setBounds(Rectangular bounds) |
void |
setFontSize(float fontSize) |
void |
setFontStyle(float fontStyle) |
void |
setFontWeight(float fontWeight) |
void |
setId(int id) |
void |
setLeftBorder(int leftBorder) |
void |
setLineThrough(float lineThrough) |
void |
setPage(Page page) |
void |
setRightBorder(int rightBorder) |
void |
setTopBorder(int topBorder) |
void |
setUnderline(float underline) |
add, addAttribute, getAttribute, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSiblingNode, getParent, getPreviousSiblingNode, getRoot, insert, isLeaf, isRoot, remove, remove, removeAllChildren
public DefaultContentRect()
public DefaultContentRect(DefaultContentRect src)
public int getId()
ContentRect
getId
in interface ContentRect
public void setId(int id)
public Page getPage()
ContentRect
getPage
in interface ContentRect
public void setPage(Page page)
public java.awt.Color getBackgroundColor()
ContentRect
getBackgroundColor
in interface ContentRect
null
for transparent backgroundpublic void setBackgroundColor(java.awt.Color backgroundColor)
public boolean isBackgroundSeparated()
ContentRect
isBackgroundSeparated
in interface ContentRect
true
for background-separated boxespublic void setBackgroundSeparated(boolean backgroundSeparated)
public float getUnderline()
ContentRect
getUnderline
in interface ContentRect
public void setUnderline(float underline)
public float getLineThrough()
ContentRect
getLineThrough
in interface ContentRect
public void setLineThrough(float lineThrough)
public float getFontSize()
ContentRect
getFontSize
in interface ContentRect
public void setFontSize(float fontSize)
public float getFontStyle()
ContentRect
getFontStyle
in interface ContentRect
public void setFontStyle(float fontStyle)
public float getFontWeight()
ContentRect
getFontWeight
in interface ContentRect
public void setFontWeight(float fontWeight)
public int getTopBorder()
ContentRect
getTopBorder
in interface ContentRect
public void setTopBorder(int topBorder)
public int getBottomBorder()
ContentRect
getBottomBorder
in interface ContentRect
public void setBottomBorder(int bottomBorder)
public int getLeftBorder()
ContentRect
getLeftBorder
in interface ContentRect
public void setLeftBorder(int leftBorder)
public int getRightBorder()
ContentRect
getRightBorder
in interface ContentRect
public void setRightBorder(int rightBorder)
public void setBorders(int top, int right, int bottom, int left)
top
- right
- bottom
- left
- public Rectangular getBounds()
ContentRect
getBounds
in interface ContentRect
public void setBounds(Rectangular bounds)
public int getBorderCount()
ContentRect
getBorderCount
in interface ContentRect
public boolean hasTopBorder()
ContentRect
hasTopBorder
in interface ContentRect
true
if the box has a top borderpublic boolean hasBottomBorder()
ContentRect
hasBottomBorder
in interface ContentRect
true
if the box has a bottom borderpublic boolean hasLeftBorder()
ContentRect
hasLeftBorder
in interface ContentRect
true
if the box has a left borderpublic boolean hasRightBorder()
ContentRect
hasRightBorder
in interface ContentRect
true
if the box has a right border