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 |
|---|---|
boolean |
equals(Object obj) |
Color |
getBackgroundColor()
Obtains the background color of the area.
|
int |
getBorderCount()
Obtains the number of defined borders for the box.
|
Border |
getBorderStyle(Border.Side side)
Obtains the properties of the box border at the given side.
|
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.
|
int |
hashCode() |
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 |
move(int xofs,
int yofs) |
static void |
resetId() |
void |
setBackgroundColor(Color backgroundColor) |
void |
setBackgroundSeparated(boolean backgroundSeparated) |
void |
setBorders(int top,
int right,
int bottom,
int left)
Sets all the border values.
|
void |
setBorderStyle(Border.Side side,
Border style) |
void |
setBottomBorder(int width) |
void |
setBounds(Rectangular bounds) |
void |
setFontSize(float fontSize) |
void |
setFontStyle(float fontStyle) |
void |
setFontWeight(float fontWeight) |
void |
setId(int id) |
void |
setLeftBorder(int width) |
void |
setLineThrough(float lineThrough) |
void |
setPage(Page page) |
void |
setRightBorder(int width) |
void |
setTopBorder(int width) |
void |
setUnderline(float underline) |
add, addUserAttribute, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSiblingNode, getParent, getPreviousSiblingNode, getRoot, getUserAttribute, insert, isLeaf, isRoot, remove, remove, removeAllChildrenpublic DefaultContentRect()
public DefaultContentRect(DefaultContentRect src)
public int getId()
ContentRectgetId in interface ContentRectpublic void setId(int id)
public Page getPage()
ContentRectgetPage in interface ContentRectpublic void setPage(Page page)
public Color getBackgroundColor()
ContentRectgetBackgroundColor in interface ContentRectnull for transparent backgroundpublic void setBackgroundColor(Color backgroundColor)
public boolean isBackgroundSeparated()
ContentRectisBackgroundSeparated in interface ContentRecttrue for background-separated boxespublic void setBackgroundSeparated(boolean backgroundSeparated)
public float getUnderline()
ContentRectgetUnderline in interface ContentRectpublic void setUnderline(float underline)
public float getLineThrough()
ContentRectgetLineThrough in interface ContentRectpublic void setLineThrough(float lineThrough)
public float getFontSize()
ContentRectgetFontSize in interface ContentRectpublic void setFontSize(float fontSize)
public float getFontStyle()
ContentRectgetFontStyle in interface ContentRectpublic void setFontStyle(float fontStyle)
public float getFontWeight()
ContentRectgetFontWeight in interface ContentRectpublic void setFontWeight(float fontWeight)
public int getTopBorder()
ContentRectgetTopBorder in interface ContentRectpublic void setTopBorder(int width)
public int getBottomBorder()
ContentRectgetBottomBorder in interface ContentRectpublic void setBottomBorder(int width)
public int getLeftBorder()
ContentRectgetLeftBorder in interface ContentRectpublic void setLeftBorder(int width)
public int getRightBorder()
ContentRectgetRightBorder in interface ContentRectpublic void setRightBorder(int width)
public boolean hasTopBorder()
ContentRecthasTopBorder in interface ContentRecttrue if the box has a top borderpublic boolean hasBottomBorder()
ContentRecthasBottomBorder in interface ContentRecttrue if the box has a bottom borderpublic boolean hasLeftBorder()
ContentRecthasLeftBorder in interface ContentRecttrue if the box has a left borderpublic boolean hasRightBorder()
ContentRecthasRightBorder in interface ContentRecttrue if the box has a right borderpublic void setBorders(int top,
int right,
int bottom,
int left)
top - right - bottom - left - public Border getBorderStyle(Border.Side side)
ContentRectgetBorderStyle in interface ContentRectside - the border side.public void setBorderStyle(Border.Side side, Border style)
public Rectangular getBounds()
ContentRectgetBounds in interface ContentRectpublic void setBounds(Rectangular bounds)
public int getBorderCount()
ContentRectgetBorderCount in interface ContentRectpublic static void resetId()
Copyright © 2016. All rights reserved.