|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Column
Represents the Column element. Only add columns if formatting of columns is necessary.
The XLElement Column 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 columns on different worksheets, or different
places in the worksheet. Only at the time of
assembly the column-index and the attribute ss:Index are automatically set,
if necessary. See also: Table.columnIterator()
.
(Also a Column that is read by the nl.fountain.xelem.lex-API has it's index set.)
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 | |
---|---|
boolean |
getAutoFitWith()
Specifies whether autofit was set on this column. |
int |
getIndex()
Gets the value of the ss:Index-attribute of this Column-element. |
int |
getSpan()
Gets the number of extra columns this column spans. |
String |
getStyleID()
Gets the ss:StyleID which was set on this column. |
double |
getWidth()
Gets the width of this column. |
boolean |
isHidden()
Specifies whether this column is hidden. |
void |
setAutoFitWidth(boolean autoFit)
Sets column-width to autofit for datatypes 'DateTime' and 'Number'. |
void |
setHidden(boolean hide)
Sets whether this column will be hidden. |
void |
setIndex(int index)
Sets the value of the ss:Index-attribute of this Column-element. |
void |
setSpan(int s)
Sets the span of this column. |
void |
setStyleID(String id)
Sets the ss:StyleID on this column. |
void |
setWidth(double w)
Sets the width of this column. |
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 column.String getStyleID()
null
if no styleID was previously set.void setAutoFitWidth(boolean autoFit)
false
is passed as a parameter.
autoFit
- false
if no autofit of column-width is
desired.boolean getAutoFitWith()
true
if column-width is set to autofit,
false
otherwisevoid setSpan(int s)
s
must be greater than 0 in order to have effect on
the resulting xml.
No other columns must be added within the span of this column:
Column column = table.addColumn(5); // adds a column with index 5 column.setWidth(25.2); // do some formatting on the column column.setSpan(3); // span a total of 4 columns // illegal: first free index = 5 + 3 + 1 = 9 // Column column2 = table.addColumn(8);
s
- The number of additional columns to include in the span.int getSpan()
void setWidth(double w)
w
- The width of the column (in points).double getWidth()
0.0
may indicate this column has a default width.
void setHidden(boolean hide)
hide
- true
if this column must not be displayed.boolean isHidden()
void setIndex(int index)
Table.columnIterator()
, which sets the
index of columns during assembly.
If you want to place a column in any particular place, use the addColumnAt-methods of Table or Worksheet.
index
- the index of this columnint getIndex()
|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |