|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Row
Represents the Row element. The XLElement Row is not aware of it's parent,
nor of it's index-position in a table or worksheet. This makes it possible
to use the same instances of Rows on different worksheets, or different
places in the worksheet. Only at the time of
assembly the row-index and the attribute ss:Index are automatically set,
if necessary. See also: Table.rowIterator()
.
(Also a Row that is read by the nl.fountain.xelem.lex-API has it's index set.)
Worksheet.addRow()
,
Table.addRow()
Field Summary |
---|
Fields inherited from interface nl.fountain.xelem.excel.XLElement |
---|
PREFIX_HTML, PREFIX_O, PREFIX_SS, PREFIX_X, XMLNS, XMLNS_HTML, XMLNS_O, XMLNS_SS, XMLNS_X |
Method Summary | |
---|---|
Cell |
addCell()
Adds a new Cell to this row. |
Cell |
addCell(Cell cell)
Adds the given Cell to this row. |
Cell |
addCell(double data)
Adds a new Cell to this row. |
Cell |
addCell(double data,
String styleID)
Adds a new Cell to this row. |
Cell |
addCell(int data)
Adds a new Cell to this row. |
Cell |
addCell(int data,
String styleID)
Adds a new Cell to this row. |
Cell |
addCell(Object data)
Adds a new Cell to this row. |
Cell |
addCell(Object data,
String styleID)
Adds a new Cell to this row. |
Cell |
addCellAt(int index)
Adds a new Cell at the given index. |
Cell |
addCellAt(int index,
Cell cell)
Adds the given Cell at the given index. |
Iterator<Cell> |
cellIterator()
Returns an iterator for the cells in this row. |
Element |
createElement(Document doc)
Creates an Element with the specified
doc as owner-document. |
Cell |
getCellAt(int index)
Gets the cell at the given index. |
TreeMap<Integer,Cell> |
getCellMap()
Gets all the cells of this row. |
Collection<Cell> |
getCells()
Gets all the cells of this row in the order of their index. |
double |
getHeight()
Gets the height of this row. |
int |
getIndex()
Gets the value of the ss:Index-attribute of this Row-element. |
int |
getSpan()
Gets the number of extra rows this row spans. |
String |
getStyleID()
Gets the ss:StyleID which was set on this row. |
boolean |
hasCellAt(int index)
Specifies whether this row has a cell at the given index |
boolean |
isHidden()
Specifies whether this row is hidden. |
int |
maxCellIndex()
Gets the highest index number of the cells in this row. |
Cell |
removeCellAt(int index)
Removes the cell at the given index. |
void |
setHeight(double h)
Sets the height of this row. |
void |
setHidden(boolean hide)
Sets whether this row will be hidden. |
void |
setIndex(int index)
Sets the value of the ss:Index-attribute of this Row-element. |
void |
setSpan(int s)
Sets the span of this row. |
void |
setStyleID(String id)
Sets the ss:StyleID on this row. |
int |
size()
Gets the number of cells in this row. |
Methods inherited from interface nl.fountain.xelem.excel.XLElement |
---|
addElementComment, assemble, getElementComments, getNameSpace, getPrefix, getTagName, setAttributes, setChildElement |
Method Detail |
---|
void setStyleID(String id)
id
- the id of the style to employ on this row.String getStyleID()
null
if no styleID was previously set.void setSpan(int s)
s
must be greater than 0 in order to have effect on
the resulting xml.
No other rows must be added within the span of this row:
Row row = table.addRow(5); // adds a row with index 5 row.setHeight(25.2); // do some formatting on the row row.setSpan(3); // span a total of 4 rows // illegal: first free index = 5 + 3 + 1 = 9 // Row row2 = table.addRow(8);
s
- The number of additional rows to include in the span.int getSpan()
void setHeight(double h)
h
- The height of the row (in points).double getHeight()
0.0
may indicate this row has a default height.
void setHidden(boolean hide)
hide
- true
if this row must not be displayed.boolean isHidden()
Cell addCell()
maxCellIndex()
+ 1.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell addCell(Object data)
maxCellIndex()
+ 1.
Datatype and value of the new cell depend on the passed object.
data
- The data to be displayed in this cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell.setData(Object)
Cell addCell(Object data, String styleID)
maxCellIndex()
+ 1.
Datatype and value of the new cell depend on the passed object. The new cell will have it's styleID set to the given id.
data
- The data to be displayed in this cell.styleID
- The id of the style to employ on this cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell.setData(Object)
,
Cell.setStyleID(String)
Cell addCell(double data)
maxCellIndex()
+ 1.
data
- The data to be displayed in this cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell.setData(double)
Cell addCell(double data, String styleID)
maxCellIndex()
+ 1.
The new cell will have it's styleID set to the given id.
data
- The data to be displayed in this cell.styleID
- The id of the style to employ on this cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell.setData(double)
,
Cell.setStyleID(String)
Cell addCell(int data)
maxCellIndex()
+ 1.
data
- The data to be displayed in this cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell addCell(int data, String styleID)
maxCellIndex()
+ 1.
The new cell will have it's styleID set to the given id.
data
- The data to be displayed in this cell.styleID
- The id of the style to employ on this cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell.setStyleID(String)
Cell addCell(Cell cell)
maxCellIndex()
+ 1.
cell
- The cell that is to be appended to this row.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell addCellAt(int index)
index
- The index (column number) of the cell.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell addCellAt(int index, Cell cell)
index
- The index (column number) of the cell.cell
- The cell that is to be appended to this row.
IndexOutOfBoundsException
- If the index is less then
Worksheet.firstColumn
or greater then
Worksheet.lastColumn
Cell removeCellAt(int index)
index
- The index (column number) of the cell.
null
if the index was not occupied
by a cell.Cell getCellAt(int index)
index
- The index (column number) of the cell.
null
boolean hasCellAt(int index)
Collection<Cell> getCells()
TreeMap<Integer,Cell> getCellMap()
int size()
int maxCellIndex()
Iterator<Cell> cellIterator()
Element createElement(Document doc)
Element
with the specified
doc
as owner-document.
The attribute span
will not be reflected in this Element.
doc
- the Document
to which this row will be
appended.
Element
.void setIndex(int index)
Table.rowIterator()
, which sets the
index of rows during assembly.
If you want to place a row in any particular place, use the addRowAt-methods of Table or Worksheet.
index
- the index of this rowint getIndex()
|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |