|
xelem.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.fountain.xelem.excel.AbstractXLElement
nl.fountain.xelem.excel.ss.SSRow
public class SSRow
An implementation of the XLElement Row.
| 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 |
| Constructor Summary | |
|---|---|
SSRow()
Constructs a new SSRow. |
|
| 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. |
Element |
assemble(Element parent,
GIO gio)
Assembles the state of this XLElement and all of it's children into an Element. |
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. |
String |
getNameSpace()
Gets the namespace of this XLElement. |
String |
getPrefix()
Gets the prefix of this XLElement. |
int |
getSpan()
Gets the number of extra rows this row spans. |
String |
getStyleID()
Gets the ss:StyleID which was set on this row. |
String |
getTagName()
Gets the tagname (localName) of this XLElement. |
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 |
setAttributes(Attributes attrs)
Does effectively nothing. |
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 class nl.fountain.xelem.excel.AbstractXLElement |
|---|
addElementComment, assemble, createAttributeNS, createAttributeNS, createElementNS, createElementNS, createElementNS, createElementNS, getElementComments, setChildElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.fountain.xelem.excel.XLElement |
|---|
addElementComment, getElementComments, setChildElement |
| Constructor Detail |
|---|
public SSRow()
Worksheet.addRow()| Method Detail |
|---|
public void setStyleID(String id)
Row
setStyleID in interface Rowid - the id of the style to employ on this row.public String getStyleID()
Row
getStyleID in interface Rownull if no styleID was previously set.public void setHeight(double h)
Row
setHeight in interface Rowh - The height of the row (in points).public double getHeight()
Row0.0
may indicate this row has a default height.
getHeight in interface Rowpublic void setSpan(int s)
Rows 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);
setSpan in interface Rows - The number of additional rows to include in the span.public int getSpan()
Row
getSpan in interface Rowpublic void setHidden(boolean hide)
Row
setHidden in interface Rowhide - true if this row must not be displayed.public boolean isHidden()
Row
isHidden in interface Rowpublic Cell addCell()
RowRow.maxCellIndex() + 1.
addCell in interface Rowpublic Cell addCell(Object data)
RowRow.maxCellIndex() + 1.
Datatype and value of the new cell depend on the passed object.
addCell in interface Rowdata - The data to be displayed in this cell.
Cell.setData(Object)
public Cell addCell(Object data,
String styleID)
RowRow.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.
addCell in interface Rowdata - The data to be displayed in this cell.styleID - The id of the style to employ on this cell.
Cell.setData(Object),
Cell.setStyleID(String)public Cell addCell(double data)
RowRow.maxCellIndex() + 1.
addCell in interface Rowdata - The data to be displayed in this cell.
Cell.setData(double)
public Cell addCell(double data,
String styleID)
RowRow.maxCellIndex() + 1.
The new cell will have it's styleID set to the given id.
addCell in interface Rowdata - The data to be displayed in this cell.styleID - The id of the style to employ on this cell.
Cell.setData(double),
Cell.setStyleID(String)public Cell addCell(int data)
RowRow.maxCellIndex() + 1.
addCell in interface Rowdata - The data to be displayed in this cell.
public Cell addCell(int data,
String styleID)
RowRow.maxCellIndex() + 1.
The new cell will have it's styleID set to the given id.
addCell in interface Rowdata - The data to be displayed in this cell.styleID - The id of the style to employ on this cell.
Cell.setStyleID(String)public Cell addCellAt(int index)
Row
addCellAt in interface Rowindex - The index (column number) of the cell.
public Cell addCell(Cell cell)
RowRow.maxCellIndex() + 1.
addCell in interface Rowcell - The cell that is to be appended to this row.
public Cell addCellAt(int index,
Cell cell)
Row
addCellAt in interface Rowindex - The index (column number) of the cell.cell - The cell that is to be appended to this row.
public Cell removeCellAt(int index)
Row
removeCellAt in interface Rowindex - The index (column number) of the cell.
null if the index was not occupied
by a cell.public Collection<Cell> getCells()
Row
getCells in interface Rowpublic Cell getCellAt(int index)
Row
getCellAt in interface Rowindex - The index (column number) of the cell.
nullpublic boolean hasCellAt(int index)
Row
hasCellAt in interface Rowpublic int size()
Row
size in interface Rowpublic TreeMap<Integer,Cell> getCellMap()
Row
getCellMap in interface Rowpublic int maxCellIndex()
Row
maxCellIndex in interface Rowpublic String getTagName()
XLElement
getTagName in interface XLElementpublic String getNameSpace()
XLElement
getNameSpace in interface XLElementpublic String getPrefix()
XLElement
getPrefix in interface XLElementpublic Iterator<Cell> cellIterator()
Row
cellIterator in interface Row
public Element assemble(Element parent,
GIO gio)
XLElementElement. Attaches the new element to it's
parent-element if needed.
assemble in interface XLElementparent - the parent-element to which the new formed element
will be appendedgio - a global information object
public Element createElement(Document doc)
RowElement with the specified
doc as owner-document.
The attribute span will not be reflected in this Element.
createElement in interface Rowdoc - the Document to which this row will be
appended.
Element.public void setAttributes(Attributes attrs)
AbstractXLElement
setAttributes in interface XLElementsetAttributes in class AbstractXLElementattrs - the attributes found on the elementpublic void setIndex(int index)
Table.rowIterator() to set the
index of this row during assembly.
setIndex in interface Rowindex - the index of this rowpublic int getIndex()
Row
getIndex in interface Row
|
xelem.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||