org.simpleods
public class Table extends java.lang.Object
Constructor and Description |
---|
Table(java.lang.String sName) |
Modifier and Type | Method and Description |
---|---|
TableCell |
getCell(int nRow,
int nCol)
Get a TableCell, if no TableCell was present at this nRow,nCol, create a
new one with a default of TableCell.STYLE_STRING and a content of "".
|
ObjectQueue |
getColumnStyles() |
java.lang.String[] |
getConfig() |
int |
getLastCol() |
int |
getLastRow() |
java.lang.String |
getName()
Get the name of this table.
|
ObjectQueue |
getRows() |
java.lang.String |
getStyle()
Get the current TableStyle
|
boolean |
setCell(int nRow,
int nCol,
int valuetype,
java.lang.String value)
Set the value of a cell.
|
boolean |
setCell(int nRow,
int nCol,
int valuetype,
java.lang.String value,
TableStyle ts)
Set the value of a cell.
|
boolean |
setCellStyle(int nRow,
int nCol,
TableStyle ts)
Set the cell style for the specified cell.
|
void |
setColumnStyle(int nCol,
TableStyle ts)
Set the style of a column.
|
void |
setName(java.lang.String name)
Set the name of this table.
|
void |
setStyle(java.lang.String style)
Set a new TableStyle
|
java.lang.String |
toXML()
Write the XML format for this object.
|
public java.lang.String[] getConfig()
public int getLastRow()
public int getLastCol()
public ObjectQueue getRows()
public ObjectQueue getColumnStyles()
public java.lang.String getStyle()
public void setStyle(java.lang.String style)
style
- The new TableStlye to be usedpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The name of this table.public boolean setCell(int nRow, int nCol, int valuetype, java.lang.String value) throws SimpleOdsException
nRow
- The row (maximal 65536)nCol
- The column (maximal 256)valuetype
- The type of the value,
TableCell.STYLE_STRING,TableCell.STYLE_FLOAT or TableCell.STYLE_PERCENTAGEvalue
- The value to be setSimpleOdsException
- Thrown when nRow or nCol have wrong values.public boolean setCell(int nRow, int nCol, int valuetype, java.lang.String value, TableStyle ts) throws SimpleOdsException
nRow
- The row (maximal 65536)nCol
- The column (maximal 256)valuetype
- The type of the value,
TableCell.STYLE_STRING,TableCell.STYLE_FLOAT or
TableCell.STYLE_PERCENTAGEvalue
- The value to be setts
- The TableStyle to be used for this cell.SimpleOdsException
- Thrown when nRow or nCol have wrong values.public TableCell getCell(int nRow, int nCol)
nRow
- The row (maximal 65536)nCol
- The column (maximal 256)public void setColumnStyle(int nCol, TableStyle ts) throws SimpleOdsException
nCol
- The column numberts
- The style to be used, make sure the style is of type
TableStyle.STYLEFAMILY_TABLECOLUMNSimpleOdsException
- Thrown if nCol has an invalid value.public boolean setCellStyle(int nRow, int nCol, TableStyle ts) throws SimpleOdsException
nRow
- The row numbernCol
- The column numberts
- The TableStyle to be usedSimpleOdsException
- when nRow or nCol have wrong valuespublic java.lang.String toXML()