|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nl.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 Row
id
- the id of the style to employ on this row.public String getStyleID()
Row
getStyleID
in interface Row
null
if no styleID was previously set.public void setHeight(double h)
Row
setHeight
in interface Row
h
- The height of the row (in points).public double getHeight()
Row
0.0
may indicate this row has a default height.
getHeight
in interface Row
public void setSpan(int s)
Row
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);
setSpan
in interface Row
s
- The number of additional rows to include in the span.public int getSpan()
Row
getSpan
in interface Row
public void setHidden(boolean hide)
Row
setHidden
in interface Row
hide
- true
if this row must not be displayed.public boolean isHidden()
Row
isHidden
in interface Row
public Cell addCell()
Row
Row.maxCellIndex()
+ 1.
addCell
in interface Row
public Cell addCell(Object data)
Row
Row.maxCellIndex()
+ 1.
Datatype and value of the new cell depend on the passed object.
addCell
in interface Row
data
- The data to be displayed in this cell.
Cell.setData(Object)
public Cell addCell(Object data, String styleID)
Row
Row.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 Row
data
- 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)
Row
Row.maxCellIndex()
+ 1.
addCell
in interface Row
data
- The data to be displayed in this cell.
Cell.setData(double)
public Cell addCell(double data, String styleID)
Row
Row.maxCellIndex()
+ 1.
The new cell will have it's styleID set to the given id.
addCell
in interface Row
data
- 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)
Row
Row.maxCellIndex()
+ 1.
addCell
in interface Row
data
- The data to be displayed in this cell.
public Cell addCell(int data, String styleID)
Row
Row.maxCellIndex()
+ 1.
The new cell will have it's styleID set to the given id.
addCell
in interface Row
data
- 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 Row
index
- The index (column number) of the cell.
public Cell addCell(Cell cell)
Row
Row.maxCellIndex()
+ 1.
addCell
in interface Row
cell
- The cell that is to be appended to this row.
public Cell addCellAt(int index, Cell cell)
Row
addCellAt
in interface Row
index
- 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 Row
index
- 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 Row
public Cell getCellAt(int index)
Row
getCellAt
in interface Row
index
- The index (column number) of the cell.
null
public boolean hasCellAt(int index)
Row
hasCellAt
in interface Row
public int size()
Row
size
in interface Row
public TreeMap<Integer,Cell> getCellMap()
Row
getCellMap
in interface Row
public int maxCellIndex()
Row
maxCellIndex
in interface Row
public String getTagName()
XLElement
getTagName
in interface XLElement
public String getNameSpace()
XLElement
getNameSpace
in interface XLElement
public String getPrefix()
XLElement
getPrefix
in interface XLElement
public Iterator<Cell> cellIterator()
Row
cellIterator
in interface Row
public Element assemble(Element parent, GIO gio)
XLElement
Element
. Attaches the new element to it's
parent-element if needed.
assemble
in interface XLElement
parent
- the parent-element to which the new formed element
will be appendedgio
- a global information object
public Element createElement(Document doc)
Row
Element
with the specified
doc
as owner-document.
The attribute span
will not be reflected in this Element.
createElement
in interface Row
doc
- the Document
to which this row will be
appended.
Element
.public void setAttributes(Attributes attrs)
AbstractXLElement
setAttributes
in interface XLElement
setAttributes
in class AbstractXLElement
attrs
- the attributes found on the elementpublic void setIndex(int index)
Table.rowIterator()
to set the
index of this row during assembly.
setIndex
in interface Row
index
- 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 |