public class Border extends InternableComplexAttr implements java.lang.Cloneable
To learn more, visit the Programming with Documents documentation article.
Borders can be applied to various document elements including paragraph, run of text inside a paragraph or a table cell.
| Modifier and Type | Method and Description |
|---|---|
void |
clearFormatting()
Resets border properties to default values.
|
boolean |
equals(Border rhs)
Determines whether the specified border is equal in value to the current border.
|
boolean |
equals(java.lang.Object obj)
Determines whether the specified object is equal in value to the current object.
|
java.awt.Color |
getColor()
Gets the border color.
|
double |
getDistanceFromText()
Gets distance of the border from text or from the page edge in points.
|
int |
getLineStyle()
Gets the border style.
|
double |
getLineWidth()
Gets the border width in points.
|
boolean |
getShadow()
Gets a value indicating whether the border has a shadow.
|
int |
hashCode() |
boolean |
isInheritedComplexAttr() |
boolean |
isVisible()
Returns true if the LineStyle is not LineStyle.None.
|
protected java.lang.Object |
memberwiseClone() |
void |
setColor(java.awt.Color value)
Sets the border color.
|
void |
setDistanceFromText(double value)
Sets distance of the border from text or from the page edge in points.
|
void |
setLineStyle(int value)
Sets the border style.
|
void |
setLineWidth(double value)
Sets the border width in points.
|
void |
setShadow(boolean value)
Sets a value indicating whether the border has a shadow.
|
notifyChangingpublic void clearFormatting()
public int getLineStyle()
If you set line style to none, then line width is automatically changed to zero.
LineStyle constants.public void setLineStyle(int value)
If you set line style to none, then line width is automatically changed to zero.
value - The border style. The value must be one of LineStyle constants.public double getLineWidth()
If you set line width greater than zero when line style is none, the line style is automatically changed to single line.
public void setLineWidth(double value)
If you set line width greater than zero when line style is none, the line style is automatically changed to single line.
value - The border width in points.public boolean isVisible()
public java.awt.Color getColor()
public void setColor(java.awt.Color value)
value - The border color.public double getDistanceFromText()
PageSetup.getBorderDistanceFrom(),
PageSetup.setBorderDistanceFrom(int)public void setDistanceFromText(double value)
value - Distance of the border from text or from the page edge in points.PageSetup.getBorderDistanceFrom(),
PageSetup.setBorderDistanceFrom(int)public boolean getShadow()
In Microsoft Word, for a border to have a shadow, the borders on all four sides (left, top, right and bottom) should be of the same type, width, color and all should have the Shadow property set to true.
public void setShadow(boolean value)
In Microsoft Word, for a border to have a shadow, the borders on all four sides (left, top, right and bottom) should be of the same type, width, color and all should have the Shadow property set to true.
value - A value indicating whether the border has a shadow.public boolean equals(Border rhs)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isInheritedComplexAttr()
protected java.lang.Object memberwiseClone()