|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.Component
org.odftoolkit.simple.table.Column
public class Column
Column represents table column feature in ODF document.
Column provides methods to get table cells that belong to this table column.
Method Summary | |
---|---|
Cell |
getCellByIndex(int index)
Get a cell with a specific index. |
int |
getCellCount()
Get the count of cells in this column. |
int |
getColumnIndex()
Get the index of this column in the owner table. |
OdfStyle |
getDefaultCellStyle()
Get the default cell style of this column. |
static Column |
getInstance(TableTableColumnElement colElement)
Get the Column instance from the
TableTableColumnElement instance. |
Column |
getNextColumn()
Get the next column of the current column. |
TableTableColumnElement |
getOdfElement()
Return an instance of TableTableColumnElement which
represents this feature. |
Column |
getPreviousColumn()
Get the previous column of the current column. |
Table |
getTable()
Get owner table of the current column. |
double |
getWidth()
Get the width of the column (in Millimeter). |
boolean |
isOptimalWidth()
Returns if the column always keeps its optimal width. |
void |
setDefaultCellStyle(OdfStyle style)
Set the default cell style to this column. |
void |
setUseOptimalWidth(boolean isUseOptimalWidth)
Set if the column always keeps its optimal width. |
void |
setWidth(double width)
Set the width of the column (in Millimeter). |
Methods inherited from class org.odftoolkit.simple.Component |
---|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Column getInstance(TableTableColumnElement colElement)
Column
instance from the
TableTableColumnElement
instance.
Each TableTableColumnElement
instance has a one-to-one
relationship to the a Column
instance.
colElement
- the column element that need to get the corresponding
Column
instance
Column
instance represent the specified column
elementpublic Table getTable()
public double getWidth()
public void setWidth(double width)
width
- the width that will be set to the column (in Millimeter).public boolean isOptimalWidth()
public void setUseOptimalWidth(boolean isUseOptimalWidth)
isUseOptimalWidth
- the flag that indicate column should keep its optimal width or
notpublic TableTableColumnElement getOdfElement()
TableTableColumnElement
which
represents this feature.
getOdfElement
in class Component
TableTableColumnElement
public int getCellCount()
public Cell getCellByIndex(int index)
index
- the cell index in this column
public Column getPreviousColumn()
public Column getNextColumn()
public int getColumnIndex()
public void setDefaultCellStyle(OdfStyle style)
The style should already exist in this document.
This method is not recommended for text document cases. These is a style assigned to each cell in tables under text documents. So setting the default cell style to a column may not work.
style
- the cell style of the documentpublic OdfStyle getDefaultCellStyle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |