|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.style.TableCellProperties
public class TableCellProperties
This class represents the table cell style settings. It provides methods to access borders styles. More functions will be added latter.
This class is a corresponded high level class for element "style:table-cell-properties". It provides methods to access the attributes and children of "style:table-cell-properties".
Constructor Summary | |
---|---|
protected |
TableCellProperties()
Create an instance of TableCellProperties |
protected |
TableCellProperties(StyleTableCellPropertiesElement properties)
Create an instance of TableCellProperties from an element |
Method Summary | |
---|---|
Color |
getBackgroundColor()
Return the background color. |
Border |
getBorder()
Return the border setting for all four borders. |
Border |
getBottomBorder()
Return the border setting for the bottom border. |
Border |
getDiagonalBlTr()
Return the border setting for the diagonal from bottom left to top right. |
Border |
getDiagonalTlBr()
Return the border setting for the diagonal from top left to bottom right. |
Border |
getLeftBorder()
Return the border setting for the left border. |
static TableCellProperties |
getOrCreateTableCellProperties(OdfStyleBase style)
Return an instance of TableCellProperties |
Border |
getRightBorder()
Return the border setting for the right border. |
static TableCellProperties |
getTableCellProperties(OdfStyleBase style)
Return an instance of TableCellProperties |
Border |
getTopBorder()
Return the border setting for the top border. |
StyleTypeDefinitions.VerticalAlignmentType |
getVerticalAlignment()
Return the vertical alignment. |
Boolean |
isWrapped()
Return whether the text is allowed to be wrapped. |
void |
setBackgroundColor(Color aColor)
Set the background color. |
void |
setBorder(Border border)
Set the border definition for all four borders. |
void |
setBorders(StyleTypeDefinitions.CellBordersType bordersType,
Border border)
Set the border style. |
void |
setBottomBorder(Border border)
Set the border definition for the bottom border. |
void |
setDiagonalBlTr(Border border)
Set the border definition for the diagonal from bottom left to top right. |
void |
setDiagonalTlBr(Border border)
Set the border definition for the diagonal from top left to bottom right. |
void |
setLeftBorder(Border border)
Set the border definition for the left border. |
void |
setRightBorder(Border border)
Set the border definition for the right border. |
void |
setTopBorder(Border border)
Set the border definition for the top border. |
void |
setVerticalAlignment(StyleTypeDefinitions.VerticalAlignmentType alignType)
Set the vertical alignment. |
void |
setWrapped(boolean isWrapped)
Set the text is allowed to be wrapped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TableCellProperties()
protected TableCellProperties(StyleTableCellPropertiesElement properties)
properties
- - the element of style:table-cell-propertiesMethod Detail |
---|
public void setBorders(StyleTypeDefinitions.CellBordersType bordersType, Border border)
The first parameter bordersType
describes which borders you
want to apply the style to, e.g. up border, bottom border, left border,
right border, diagonal lines or four borders.
The border style information will be removed if the parameter
bordersType
is NONE.
bordersType
- - the type of the bordersborder
- - the border style descriptionpublic Border getBorder()
Null will be returned if there is no border setting for all four borders.
public Border getTopBorder()
Null will be returned if there is no border setting for the top border.
public Border getLeftBorder()
Null will be returned if there is no border setting for the left border.
public Border getRightBorder()
Null will be returned if there is no border setting for the right border.
public Border getBottomBorder()
Null will be returned if there is no border setting for the bottom border.
public Border getDiagonalBlTr()
Null will be returned if there is no border setting for the diagonal from bottom left to top right.
public Border getDiagonalTlBr()
Null will be returned if there is no border setting for the diagonal from top left to bottom right.
public void setBottomBorder(Border border)
If the parameter border
is null, the border definition for
the bottom border will be removed.
If the line type in the border definition is NONE, the border definition for the bottom border will be removed.
border
- - the border settingpublic void setTopBorder(Border border)
If the parameter border
is null, the border definition for
the top border will be removed.
If the line type in the border definition is NONE, the border definition for the top border will be removed.
border
- - the border settingpublic void setLeftBorder(Border border)
If the parameter border
is null, the border definition for
the left border will be removed.
If the line type in the border definition is NONE, the border definition for the left border will be removed.
border
- - the border settingpublic void setRightBorder(Border border)
If the parameter border
is null, the border definition for
the right border will be removed.
If the line type in the border definition is NONE, the border definition for the right border will be removed.
border
- - the border settingpublic void setDiagonalBlTr(Border border)
If the parameter border
is null, the border definition for
the diagonal from bottom left to top right will be removed.
If the line type in the border definition is NONE, the border definition for the diagonal from bottom left to top right will be removed.
border
- - the border settingpublic void setDiagonalTlBr(Border border)
If the parameter border
is null, the border definition for
the diagonal from top left to bottom right will be removed.
If the line type in the border definition is NONE, the border definition for the diagonal from top left to bottom right will be removed.
border
- - the border settingpublic void setBorder(Border border)
If the parameter border
is null, the border definition for
all four borders will be removed.
If the line type in the border definition is NONE, the border definition for all four borders will be removed.
border
- - the border settingpublic void setBackgroundColor(Color aColor)
If the parameter aColor
is null, the background color
definition will be removed.
aColor
- - the background colorpublic Color getBackgroundColor()
Null will be returned if there is no the background color definition or the background color definition is not valid.
public void setWrapped(boolean isWrapped)
If the parameter isWrapped
is true, the text will be allowed
to be wrapped. Or else, the text is not allowed to be wrapped.
isWrapped
- - the wrapped optionpublic void setVerticalAlignment(StyleTypeDefinitions.VerticalAlignmentType alignType)
If the parameter alignType
is null or DEFAULT, the vertical
alignment definition will be removed.
alignType
- - the vertical alignmentpublic StyleTypeDefinitions.VerticalAlignmentType getVerticalAlignment()
If there is no vertical alignment definition, null will be returned.
public Boolean isWrapped()
Return true if the text is allowed to be wrapped. Or else, return false.
public static TableCellProperties getOrCreateTableCellProperties(OdfStyleBase style)
TableCellProperties to represent the "style:table-cell-properties" in a style element.
If there is no "style:table-cell-properties" defined in the style element, a new "style:table-cell-properties" element will be created.
- Parameters:
style
- - a style element
- Returns:
- an instance of
TableCellProperties
public static TableCellProperties getTableCellProperties(OdfStyleBase style)
TableCellProperties to represent the "style:table-cell-properties" in a style element.
If there is no "style:table-cell-properties" defined in the style element, null will be returned.
- Parameters:
style
- - a style element
- Returns:
- an instance of
TableCellProperties;Null if there is no
"style:table-cell-properties" defined
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |