|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.ooffice.OOTableWriter
@ThirdParty(value="uses OpenOffice.org libraries") public class OOTableWriter
provides easy to use table-related functionality for TextFrames This class implements ThirdParty for its use of OpenOffice libraries; see www.openoffice.org
Cell| Constructor Summary | |
|---|---|
OOTableWriter(OOWriter doc)
|
|
| Method Summary | |
|---|---|
int |
appendRows(String tableName,
int count)
returns the number of rows in the given table including the appended rows |
TableModel |
asTableModel(String table,
boolean firstRowIsHeader)
|
void |
copyCellText(com.sun.star.table.XCell origin,
com.sun.star.table.XCell target)
|
int |
deleteRows(String tableName,
int atRow,
int count)
returns the number of rows in the given table including the inserted rows |
void |
deleteTable(String tableName)
|
Cell |
getCell(String tableName,
int row,
int column)
|
Cell |
getCell(String tableName,
String cellName)
|
Cell |
getCellForBookmark(String bookmark)
|
Cell |
getCellForCursor(com.sun.star.text.XTextCursor cursor)
|
String |
getCellNameFor(String bookmark)
|
String |
getCellNameFor(com.sun.star.table.XCell cell)
|
String[] |
getCellNamesFor(String tableName)
|
String |
getCellText(com.sun.star.table.XCell cell)
|
static int |
getColumnForCellName(String cellName)
|
com.sun.star.text.XTextCursor |
getCursorForCell(com.sun.star.table.XCell cell)
|
int |
getNumberOfColumns(String tableName)
|
int |
getNumberOfRows(String tableName)
|
OOWriter |
getOOWriter()
|
static int |
getRowForCellName(String cell)
only works properly for simple cell names (without merged/splitted cells) |
com.sun.star.text.XTextTable |
getTable(String tableName)
|
com.sun.star.text.XTextTable |
getTableFor(com.sun.star.table.XCell cell)
|
String |
getTableNameFor(String bookmark)
|
String |
getTableNameFor(com.sun.star.table.XCell cell)
|
String[] |
getTableNames()
|
void |
gotoCell(com.sun.star.table.XCell cell)
moves the visible cursor to the given cell |
int |
insertRows(String tableName,
int atRow,
int count)
returns the number of rows in the given table including the inserted rows |
int |
insertRowsAtBookmark(String bookmark,
int count)
|
String |
insertTable(int rows,
int columns)
uses the view cursor |
String |
insertTable(int rows,
int columns,
com.sun.star.text.XTextRange position)
the table is inserted at the start of the given position and the name of the table is returned. |
String |
insertTableModel(TableModel model)
uses the view cursor |
String |
insertTableModel(TableModel model,
com.sun.star.text.XTextRange position)
inserts the model at the given location and returns the name of the table |
Cell |
mergeWithRightCell(com.sun.star.table.XCell cell)
merges the given cell with the one to its right. |
void |
placeTableModel(TableModel model,
String table,
int startingRow,
int startingColumn,
boolean withHeader)
places the model into the given table starting at the given position; additional rows are inserted as needed |
Cell |
relativeMove(com.sun.star.table.XCell cell,
Direction direction,
int amount)
supported directions are Direction.get2Dimensionals() |
void |
setCellBackground(com.sun.star.table.XCell cell,
Color color)
|
void |
setCellBackground(com.sun.star.table.XCell cell,
String imageURL)
|
void |
setCellBorder(com.sun.star.table.XCell cell,
CellBorder border)
|
com.sun.star.text.XText |
setCellText(String tableName,
int row,
int column,
String text)
returns the text component of the target cell for further handling |
com.sun.star.text.XText |
setCellText(String tableName,
String cellName,
String text)
returns the text component of the target cell for further handling |
com.sun.star.text.XText |
setCellText(com.sun.star.table.XCell cell,
String text)
returns the text component of the target cell for further handling |
void |
setKeepTogether(String tableName,
boolean flag)
|
void |
setRepeatHeaderline(String tableName,
boolean flag)
|
void |
setTableProperty(String tableName,
String key,
Object value)
|
OOWriter |
unwrap()
returns the embedded instance that this wrapper encloses |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OOTableWriter(OOWriter doc)
| Method Detail |
|---|
public OOWriter getOOWriter()
public OOWriter unwrap()
Wrapped
unwrap in interface Wrapped<OOWriter>
public String insertTable(int rows,
int columns)
throws OfficeException
OfficeException
public String insertTable(int rows,
int columns,
com.sun.star.text.XTextRange position)
throws OfficeException
OfficeException
public void deleteTable(String tableName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public int deleteRows(String tableName,
int atRow,
int count)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public int insertRows(String tableName,
int atRow,
int count)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public int appendRows(String tableName,
int count)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public int getNumberOfRows(String tableName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public int getNumberOfColumns(String tableName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public String getCellText(com.sun.star.table.XCell cell)
throws OfficeException
OfficeException
public String[] getCellNamesFor(String tableName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public String getCellNameFor(com.sun.star.table.XCell cell)
throws OfficeException
OfficeException
public com.sun.star.text.XTextTable getTableFor(com.sun.star.table.XCell cell)
throws OfficeException
OfficeException
public String getTableNameFor(com.sun.star.table.XCell cell)
throws OfficeException
OfficeExceptionpublic String[] getTableNames()
public static int getRowForCellName(String cell)
public static int getColumnForCellName(String cellName)
public int insertRowsAtBookmark(String bookmark,
int count)
throws OfficeException
OfficeException
public String getTableNameFor(String bookmark)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public String getCellNameFor(String bookmark)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCellForBookmark(String bookmark)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCellForCursor(com.sun.star.text.XTextCursor cursor)
throws OfficeException
OfficeException
public com.sun.star.text.XTextCursor getCursorForCell(com.sun.star.table.XCell cell)
throws OfficeException
OfficeExceptionpublic void gotoCell(com.sun.star.table.XCell cell)
public com.sun.star.text.XText setCellText(String tableName,
String cellName,
String text)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public com.sun.star.text.XText setCellText(String tableName,
int row,
int column,
String text)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public com.sun.star.text.XText setCellText(com.sun.star.table.XCell cell,
String text)
public Cell getCell(String tableName,
int row,
int column)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell getCell(String tableName,
String cellName)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public Cell relativeMove(com.sun.star.table.XCell cell,
Direction direction,
int amount)
throws OfficeException,
IllegalArgumentException
Direction.get2Dimensionals()
OfficeException
IllegalArgumentException
public void copyCellText(com.sun.star.table.XCell origin,
com.sun.star.table.XCell target)
throws OfficeException
OfficeException
public Cell mergeWithRightCell(com.sun.star.table.XCell cell)
throws OfficeException
OfficeException
public void setCellBackground(com.sun.star.table.XCell cell,
Color color)
throws OfficeException
OfficeException
public void setCellBackground(com.sun.star.table.XCell cell,
String imageURL)
throws OfficeException
OfficeException
public void setCellBorder(com.sun.star.table.XCell cell,
CellBorder border)
throws OfficeException
OfficeException
public com.sun.star.text.XTextTable getTable(String tableName)
throws OfficeException
OfficeException
public void setRepeatHeaderline(String tableName,
boolean flag)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setKeepTogether(String tableName,
boolean flag)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public void setTableProperty(String tableName,
String key,
Object value)
throws OfficeException,
IllegalArgumentException
OfficeException
IllegalArgumentException
public TableModel asTableModel(String table,
boolean firstRowIsHeader)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeException
public String insertTableModel(TableModel model)
throws OfficeException
OfficeException
public String insertTableModel(TableModel model,
com.sun.star.text.XTextRange position)
throws OfficeException
OfficeException
public void placeTableModel(TableModel model,
String table,
int startingRow,
int startingColumn,
boolean withHeader)
throws OfficeException
OfficeException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||