org.simpleods
public class TableCell extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
STYLE_CURRENCY |
static int |
STYLE_DATE |
static int |
STYLE_FLOAT |
static int |
STYLE_PERCENTAGE |
static int |
STYLE_STRING |
Constructor and Description |
---|
TableCell(int valuetype,
java.lang.String value)
A table cell.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnsSpanned() |
java.lang.String |
getCurrency()
Return the currently set currency value.
|
java.lang.String |
getDateValue() |
int |
getRowsSpanned() |
java.lang.String |
getStyle() |
java.lang.String |
getText()
Get the text within this cell.
|
java.lang.String |
getValue() |
int |
getValueType() |
void |
setColumnsSpanned(int n)
To merge cells, set the number of columns that should be merged.
|
void |
setCurrency(java.lang.String currency)
Set the currency value and table cell style to STYLE_CURRENCY.
|
void |
setDateValue(java.util.Calendar cal)
Set the date value for a cell with TableCell.STYLE_DATE.
|
void |
setRowsSpanned(int n)
To merge cells, set the number of rows that should be merged.
|
void |
setStyle(java.lang.String style) |
void |
setText(java.lang.String text) |
void |
setValue(java.lang.String value) |
void |
setValueType(int valueType)
Set the type of the value for this cell.
|
java.lang.String |
toXML()
Write the XML format for this object.
|
public static final int STYLE_STRING
public static final int STYLE_FLOAT
public static final int STYLE_PERCENTAGE
public static final int STYLE_CURRENCY
public static final int STYLE_DATE
public TableCell(int valuetype, java.lang.String value)
valuetype
- The value type for this cell.value
- The String content for this cell.public int getValueType()
public void setValueType(int valueType)
valueType
- - TableCell.STYLE_STRING,TableCell.STYLE_FLOAT,TableCell.STYLE_PERCENTAGE,TableCell.STYLE_CURRENCY or TableCell.STYLE_DATEpublic java.lang.String getText()
public void setText(java.lang.String text)
public java.lang.String getCurrency()
public void setCurrency(java.lang.String currency)
currency
- The currency valuepublic java.lang.String getValue()
public void setValue(java.lang.String value)
public java.lang.String getDateValue()
public void setDateValue(java.util.Calendar cal)
cal
- - A Calendar object with the date to be usedpublic java.lang.String getStyle()
public void setStyle(java.lang.String style)
public int getColumnsSpanned()
public void setColumnsSpanned(int n)
n
- - The number of cells to be mergedpublic int getRowsSpanned()
public void setRowsSpanned(int n)
n
- - The number of rows to be mergedpublic java.lang.String toXML()