|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jopendocument.dom.ODNode
org.jopendocument.dom.StyledNode<S,D>
org.jopendocument.dom.ImmutableDocStyledNode<S,D>
org.jopendocument.dom.spreadsheet.Table<D>
D - type of table parentpublic class Table<D extends ODDocument>
A single sheet in a spreadsheet.
| Constructor Summary | |
|---|---|
Table(D parent,
org.jdom.Element local)
|
|
| Method Summary | |
|---|---|
void |
detach()
|
void |
duplicateFirstRows(int nbFirstRows,
int nbDuplicate)
|
void |
duplicateRows(int start,
int count,
int copies)
Clone a range of rows. |
void |
ensureColumnCount(int newSize)
Assure that this sheet has at least newSize columns. |
void |
ensureRowCount(int newSize)
|
MutableCell<D> |
getCellAt(int x,
int y)
|
MutableCell<D> |
getCellAt(String ref)
|
Column<D> |
getColumn(int i)
|
int |
getColumnCount()
|
int |
getHeaderColumnCount()
|
int |
getHeaderRowCount()
|
protected Cell<D> |
getImmutableCellAt(int x,
int y)
|
protected Cell<D> |
getImmutableCellAt(String ref)
|
SheetTableModel.MutableTableModel<D> |
getMutableTableModel(int column,
int row)
|
SheetTableModel.MutableTableModel<D> |
getMutableTableModel(Point start,
Point end)
Return the table from start to end inclusive. |
String |
getName()
|
Object |
getPrintRanges()
|
int |
getRowCount()
|
CellStyle |
getStyleAt(int column,
int row)
|
String |
getStyleNameAt(int column,
int row)
Find the style name for the specified cell. |
List<Tuple2<Integer,Integer>> |
getStyleReferences(String cellStyleName)
Return the coordinates of cells using the passed style. |
protected org.jdom.Namespace |
getTABLE()
|
SheetTableModel<D> |
getTableModel(int column,
int row)
|
SheetTableModel<D> |
getTableModel(int column,
int row,
int lastCol,
int lastRow)
|
Object |
getValueAt(int column,
int row)
|
Object |
getValueAt(String ref)
Retourne la valeur de la cellule spécifiée. |
Float |
getWidth()
Table width. |
void |
insertDuplicatedRows(int rowDuplicated,
int nbDuplicate)
|
boolean |
isCellValid(int x,
int y)
|
void |
merge(TableModel t,
int column,
int row)
|
void |
merge(TableModel t,
int column,
int row,
boolean includeColNames)
Merges t into this sheet at the specified point. |
void |
removeColumn(int colIndex,
boolean keepTableWidth)
|
void |
removeColumn(int firstIndex,
int lastIndex,
boolean keepTableWidth)
Remove columns from this. |
void |
removePrintRanges()
|
Point |
resolveHint(String ref)
|
void |
setColumnCount(int newSize)
Changes the column count without keeping the table width. |
void |
setColumnCount(int newSize,
int colIndex,
boolean keepTableWidth)
Changes the column count. |
void |
setName(String name)
|
void |
setPrintRanges(String s)
|
void |
setRowCount(int newSize)
|
void |
setRowCount(int newSize,
int rowIndex)
Changes the row count. |
void |
setValueAt(Object val,
int x,
int y)
Sets the value at the specified coordinates. |
| Methods inherited from class org.jopendocument.dom.ImmutableDocStyledNode |
|---|
getContent, getODDocument |
| Methods inherited from class org.jopendocument.dom.StyledNode |
|---|
getPrivateStyle, getStyle, getStyle, getStyleName, setStyleName |
| Methods inherited from class org.jopendocument.dom.ODNode |
|---|
getElement, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Table(D parent,
org.jdom.Element local)
| Method Detail |
|---|
public final String getName()
public final void setName(String name)
public void detach()
public final Object getPrintRanges()
public final void setPrintRanges(String s)
public final void removePrintRanges()
public final void duplicateFirstRows(int nbFirstRows,
int nbDuplicate)
public final void insertDuplicatedRows(int rowDuplicated,
int nbDuplicate)
public final void duplicateRows(int start,
int count,
int copies)
duplicateRows(2, 4, 1).
start - the first row to clone.count - the number of rows after start to clone.copies - the number of copies of the range to make.public final Point resolveHint(String ref)
public final boolean isCellValid(int x,
int y)
public final MutableCell<D> getCellAt(int x,
int y)
public final MutableCell<D> getCellAt(String ref)
public final void setValueAt(Object val,
int x,
int y)
val - the new value, null will be treated as "".x - the column.y - the row.
protected final Cell<D> getImmutableCellAt(int x,
int y)
protected final Cell<D> getImmutableCellAt(String ref)
public final Object getValueAt(int column,
int row)
row - la ligne (0 a lineCount-1)column - la colonnee (0 a colonneCount-1)
public final String getStyleNameAt(int column,
int row)
column - column index.row - row index.
null.
public final CellStyle getStyleAt(int column,
int row)
public final List<Tuple2<Integer,Integer>> getStyleReferences(String cellStyleName)
cellStyleName - a style name.
cellStyleName.public final Object getValueAt(String ref)
ref - une référence de la forme "A3".
public final Column<D> getColumn(int i)
public final int getRowCount()
public final int getHeaderRowCount()
public final int getColumnCount()
public final int getHeaderColumnCount()
public final void setColumnCount(int newSize)
newSize - the new column count.setColumnCount(int, int, boolean)public final void ensureColumnCount(int newSize)
newSize columns.
newSize - the minimum column count this table should have.
public final void setColumnCount(int newSize,
int colIndex,
boolean keepTableWidth)
newSize is less than getColumnCount()
extra cells will be chopped off. Otherwise empty cells will be created.
newSize - the new column count.colIndex - the index of the column to be copied, -1 for empty column (i.e. default
style).keepTableWidth - true if the table should be same width after the column
change.
public final void removeColumn(int colIndex,
boolean keepTableWidth)
public final void removeColumn(int firstIndex,
int lastIndex,
boolean keepTableWidth)
keepTableWidth only works for tables in text document that are not
aligned automatically (ie fill the entire page). ATTN spreadsheet applications may hide from
you the real width of sheets, eg display only columns A to AJ when in reality there's
hundreds of blank columns beyond. Thus if you pass true to
keepTableWidth you'll end up with huge widths.
firstIndex - the first column to remove.lastIndex - the last column to remove, exclusive.keepTableWidth - true if the table should be same width after the column
change.public final Float getWidth()
null (table has no style or style has no width,
eg in SpreadSheet).public final void ensureRowCount(int newSize)
public final void setRowCount(int newSize)
public final void setRowCount(int newSize,
int rowIndex)
newSize is less than getRowCount() extra rows
will be chopped off. Otherwise empty cells will be created.
newSize - the new row count.rowIndex - the index of the row to be copied, -1 for empty row (i.e. default style).
public final SheetTableModel<D> getTableModel(int column,
int row)
public final SheetTableModel<D> getTableModel(int column,
int row,
int lastCol,
int lastRow)
public final SheetTableModel.MutableTableModel<D> getMutableTableModel(int column,
int row)
public final SheetTableModel.MutableTableModel<D> getMutableTableModel(Point start,
Point end)
start to end inclusive.
start - the first cell of the result.end - the last cell of the result.
public final void merge(TableModel t,
int column,
int row)
public final void merge(TableModel t,
int column,
int row,
boolean includeColNames)
t - the data to be merged.column - the columnn t will be merged at.row - the row t will be merged at.includeColNames - if true the column names of t will also be merged.protected final org.jdom.Namespace getTABLE()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||