org.simpleods
public class BorderStyle extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BORDER_DOUBLE
Flag to indicate a border style 'Double', used by setBorderStyle().
|
static int |
BORDER_SOLID
Flag to indicate a border style 'Solid', used by setBorderStyle().
|
static int |
POSITION_ALL
Flag to indicate that all borders should be shown, used by setPosition().
|
static int |
POSITION_BOTTOM
Flag to indicate that the bottom border should be shown, used by setPosition().
|
static int |
POSITION_LEFT
Flag to indicate that the left border should be shown, used by setPosition().
|
static int |
POSITION_RIGHT
Flag to indicate that the right border should be shown, used by setPosition().
|
static int |
POSITION_TOP
Flag to indicate that the top border should be shown, used by setPosition().
|
Constructor and Description |
---|
BorderStyle(java.lang.String sSize,
java.lang.String sColor,
int nStyle,
int nPos)
sSize is a length value expressed as a number followed by a unit of
measurement e.g. 0.1cm or 4px.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBorderColor()
Get the currently set border color.
|
java.lang.String |
getBorderSize()
Gets the current value of border size.
|
int |
getBorderStyle()
Gets the current border Style.
|
int |
getPosition()
Returns the border positions as numerical value.
|
void |
setBorderColor(java.lang.String borderColor)
Set the border color to sColor.
|
void |
setBorderSize(int borderSize)
Set the border size in points to the given value.
|
void |
setBorderSize(java.lang.String borderSize)
Adds the border size, e.g. '0.1cm'. borderSize is a length value
expressed as a number followed by a unit of measurement e.g. 0.1cm or 4px The valid units in OpenDocument are in, cm, mm, px (pixels), pc (picas; 6 picas equals one inch), and pt (points; 72points equal one inch). |
void |
setBorderStyle(int borderStyle)
Sets the border style.
|
void |
setBorderStyleDouble()
Sets the border size to double.
|
void |
setBorderStyleSolid()
Sets the border size to solid.
|
void |
setPosition(int position)
Sets the position of the border, e.g.
|
java.lang.String |
toString() |
void |
unsetBorderStyle()
Resets any previously set BorderStyle.
|
public static final int POSITION_TOP
public static final int POSITION_BOTTOM
public static final int POSITION_LEFT
public static final int POSITION_RIGHT
public static final int POSITION_ALL
public static final int BORDER_SOLID
public static final int BORDER_DOUBLE
public BorderStyle(java.lang.String sSize, java.lang.String sColor, int nStyle, int nPos)
sSize
- The size of the bordersColor
- The color of the border in format '#rrggbb'nStyle
- The style of the border, BorderStyle.BORDER_SOLID or
BorderStyle.BORDER_DOUBLEnPos
- The position to put the border on the cell,
BorderStyle.POSITION_TOP,BorderStyle.POSITION_BOTTOM,
BorderStyle.POSITION_LEFT,BorderStyle.POSITION_RIGHT or
BorderStyle.POSITION_ALLpublic java.lang.String getBorderSize()
public final void setBorderSize(java.lang.String borderSize)
borderSize
- The border size as a unit of measurementpublic void setBorderSize(int borderSize)
borderSize
- - The border size as int , e.g. 2 or 3public java.lang.String getBorderColor()
public final void setBorderColor(java.lang.String borderColor)
borderColor
- The color to be used in format #rrggbb e.g. #ff0000 for a red
border.public int getBorderStyle()
public final void setBorderStyle(int borderStyle)
borderStyle
- BorderStyle.BORDER_SOLID, BorderStyle.BORDER_DOUBLEpublic void setBorderStyleSolid()
public void setBorderStyleDouble()
public void unsetBorderStyle()
public int getPosition()
public final void setPosition(int position)
position
- The position as one of
POSITION_TOP,POSITION_BOTTOM,POSITION_LEFT,POSITION_RIGHT or
POSITION_ALL.public java.lang.String toString()
toString
in class java.lang.Object