public class Border extends Object
| Modifier and Type | Field and Description |
|---|---|
static Border |
NONE
A static variable to represent a border without any lines, which means no border at all.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Border()
Constructor to create an empty border
|
|
Border(Color aColor,
double width,
double innerLineWidth,
double outerLineWidth,
StyleTypeDefinitions.SupportedLinearMeasure linearMeasure)
Constructor to create a double line border
|
|
Border(Color aColor,
double width,
StyleTypeDefinitions.SupportedLinearMeasure linearMeasure)
Constructor to create a single line border
|
| Modifier and Type | Method and Description |
|---|---|
protected Border |
changeLineMeasure(StyleTypeDefinitions.SupportedLinearMeasure newLineMeasure)
Return a border which is same but with a different line measurement
|
boolean |
equals(Object o) |
protected String |
getBorderDescription()
Return the description string of border style.
|
Color |
getColor()
Return the color of this border
|
double |
getDistance()
Return the distance between inner line and outer line of border with double lines
|
protected String |
getDoubleLineWidthDescription()
Return a description string for border widths with double lines.
|
double |
getInnerLineWidth()
Return the inner line width of border with double lines
|
StyleTypeDefinitions.SupportedLinearMeasure |
getLinearMeasure()
Return the linear measurement
|
StyleTypeDefinitions.LineType |
getLineStyle()
Return the line style of the border.
|
double |
getOuterLineWidth()
Return the outer line width of border with double lines
|
double |
getWidth()
Return the width of this border
|
protected void |
setBorderByDescription(String borderDesc)
Set border style by a description string.
|
void |
setColor(Color color)
Set the color of this border
|
void |
setDistance(double distance)
Set the distance between inner line and outer line of border with double lines.
|
protected void |
setDoubleLineWidthByDescription(String widthDesc)
Set the border widths with double lines by a description string.
|
void |
setInnerLineWidth(double innerWidth)
Set the inner line width of border with double lines If the line style is not double, nothing
will happen.
|
void |
setLinearMeasure(StyleTypeDefinitions.SupportedLinearMeasure linearMeasure)
Set linear measurement
|
void |
setLineStyle(StyleTypeDefinitions.LineType lineStyle)
Set the line style of the border.
|
void |
setOuterLineWidth(double lineWidth)
Set the outer line width of border with double lines If the line style is not double, nothing
will happen.
|
void |
setWidth(double width)
Set the width of this border
|
String |
toString() |
public static Border NONE
protected Border()
public Border(Color aColor, double width, StyleTypeDefinitions.SupportedLinearMeasure linearMeasure)
aColor - - the color of the borderwidth - - the line width of the borderlinearMeasure - - the linear measurement of the border widthpublic Border(Color aColor, double width, double innerLineWidth, double outerLineWidth, StyleTypeDefinitions.SupportedLinearMeasure linearMeasure)
aColor - - the color of the borderwidth - - the line width of the borderinnerLineWidth - - the inner line width of the borderouterLineWidth - - the outer line width of the borderlinearMeasure - - the linear measurement of the border widthIllegalArgumentException - if the width is not bigger than the sum of inner line width
and outer line width.public StyleTypeDefinitions.LineType getLineStyle()
The possible return value are "SINGLE","DOUBLE", and "NONE";
public void setLineStyle(StyleTypeDefinitions.LineType lineStyle)
The valid parameter can be "SINGLE","DOUBLE", and "NONE";
lineStyle - - the line style of the border.protected void setBorderByDescription(String borderDesc)
borderDesc - - the description of border styleprotected String getBorderDescription()
public Color getColor()
public void setColor(Color color)
color - - the colorpublic double getWidth()
public void setWidth(double width)
width - - the width of this borderprotected String getDoubleLineWidthDescription()
protected void setDoubleLineWidthByDescription(String widthDesc)
widthDesc - - the description stringpublic double getInnerLineWidth()
public void setInnerLineWidth(double innerWidth)
innerWidth - - the inner line widthpublic double getDistance()
public void setDistance(double distance)
distance - - the distance between inner line and outer line.public double getOuterLineWidth()
public void setOuterLineWidth(double lineWidth)
lineWidth - - the outer line widthprotected Border changeLineMeasure(StyleTypeDefinitions.SupportedLinearMeasure newLineMeasure)
newLineMeasure - - the new measurementpublic StyleTypeDefinitions.SupportedLinearMeasure getLinearMeasure()
public void setLinearMeasure(StyleTypeDefinitions.SupportedLinearMeasure linearMeasure)
linearMeasure - the linear measurementCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.