public interface CsvSheet
Modifier and Type | Method and Description |
---|---|
CsvSheet |
activate()
Activates this sheet.
|
CsvSheet |
autoResizeColumn(int columnPosition)
Sets the width of the given column to fit its contents.
|
void |
close()
Closes this sheet.
|
void |
close(boolean saveChanges,
java.lang.String pathname)
Closes this sheet.
|
CsvSheet |
deleteColumn(int columnPosition)
Deletes the column at the given row position.
|
CsvSheet |
deleteColumns(int columnPosition,
int howMany)
Deletes a number of columns starting at the given column position.
|
CsvSheet |
deleteRow(int rowPosition)
Deletes the row at the given row position.
|
CsvSheet |
deleteRows(int rowPosition,
int howMany)
Deletes a number of rows starting at the given row position.
|
Range |
getActiveCell()
Returns the active cell in this sheet.
|
Range |
getActiveRange()
Returns the active range for the active sheet.
|
int |
getColumnWidth(int columnPosition)
Gets the width in pixels of the given column.
|
int |
getIndex()
Gets the position of the sheet in the application.
|
int |
getNumColumns() |
int |
getNumRows() |
java.lang.String |
getPathname()
Returns the pathname of the file to be saved.
|
CsvProperties |
getProperties()
Returns the properties that will be used for saving data to a file.
|
Range |
getRange()
Returns the range containing all the cells.
|
Range |
getRange(int row,
int column)
Returns the range with the top left cell at the given coordinates.
|
Range |
getRange(int row,
int column,
int numRows,
int numColumns)
Returns the range with the top left cell at the given coordinates with the given number of rows
and columns.
|
int |
getRowHeight(int rowPosition)
Gets the height in pixels of the given row.
|
CsvSheet |
insertColumnAfter(int afterPosition)
Inserts a column after the given column position.
|
CsvSheet |
insertColumnBefore(int beforePosition)
Inserts a column before the given column position.
|
CsvSheet |
insertColumnsAfter(int afterPosition,
int howMany)
Inserts a number of columns after the given column position.
|
CsvSheet |
insertColumnsBefore(int beforePosition,
int howMany)
Inserts a number of columns before the given column position.
|
CsvSheet |
insertRowAfter(int afterPosition)
Inserts a row after the given row position.
|
CsvSheet |
insertRowBefore(int beforePosition)
Inserts a row before the given row position.
|
CsvSheet |
insertRowsAfter(int afterPosition,
int howMany)
Inserts a number of rows after the given row position.
|
CsvSheet |
insertRowsBefore(int beforePosition,
int howMany)
Inserts a number of rows before the given row position.
|
boolean |
isModified()
Returns true if this editor has been modified.
|
boolean |
redo()
Redo the last change.
|
void |
save()
Saves changes to the specified file.
|
void |
saveAs(java.lang.String pathname)
Saves changes to the different file.
|
Range |
setActiveRange(Range range)
Sets the active range for the active sheet.
|
CsvSheet |
setColumnWidth(int columnPosition,
int width)
Sets the width of the given column in pixels.
|
void |
setPathname(java.lang.String pathname)
Sets the pathname of the file to be saved.
|
CsvSheet |
setProperties(CsvProperties properties)
Sets the properties that will be used for saving data to a file.
|
CsvSheet |
sort(java.lang.Object sortSpecObj)
Sorts a sheet, by column and order specified.
|
boolean |
undo()
Undo the last change.
|
CsvSheet activate()
int getIndex()
java.lang.String getPathname()
void setPathname(java.lang.String pathname)
pathname
- the pathname of the fileCsvProperties getProperties()
CsvSheet setProperties(CsvProperties properties)
properties
- the properties to setboolean isModified()
void save()
setPathname(String)
before calling this method to specify a name for the file, or use
saveAs(String)
instead. Otherwise the user is asked to supply a pathname.void saveAs(java.lang.String pathname)
pathname
- the pathname of the file to be saved.void close()
void close(boolean saveChanges, java.lang.String pathname)
saveChanges
- If there are no changes to the sheet, this argument is ignored. If there are
changes to the sheet, this argument specifies whether changes should be saved. If set to
true, changes are saved to the file. If there is not yet a file pathname associated with
the sheet, then pathname is used. If pathname is omitted, the user is asked to supply a
pathname.pathname
- If saveChanges is true, the pathname with which to save the file. The default
is to prompt for the pathname.boolean undo()
boolean redo()
CsvSheet autoResizeColumn(int columnPosition)
columnPosition
- the position of the given column to resizeint getRowHeight(int rowPosition)
rowPosition
- the position of the row to examineint getColumnWidth(int columnPosition)
columnPosition
- the position of the column to examineCsvSheet setColumnWidth(int columnPosition, int width)
columnPosition
- the position of the given column to setwidth
- the width in pixels to set it toCsvSheet insertRowAfter(int afterPosition)
afterPosition
- the row after which the new row should be addedCsvSheet insertRowsAfter(int afterPosition, int howMany)
afterPosition
- the row after which the new row should be addedhowMany
- the number of rows to insertCsvSheet insertRowBefore(int beforePosition)
beforePosition
- the row before which the new row should be addedCsvSheet insertRowsBefore(int beforePosition, int howMany)
beforePosition
- the row before which the new row should be addedhowMany
- the number of rows to insertCsvSheet deleteRow(int rowPosition)
rowPosition
- the position of the row, starting at 1 for the first rowCsvSheet deleteRows(int rowPosition, int howMany)
rowPosition
- the position of the first row to deletehowMany
- the number of rows to deleteCsvSheet insertColumnAfter(int afterPosition)
afterPosition
- the column after which the new column should be addedCsvSheet insertColumnsAfter(int afterPosition, int howMany)
afterPosition
- the column after which the new column should be addedhowMany
- the number of columns to insertCsvSheet insertColumnBefore(int beforePosition)
beforePosition
- the column before which the new column should be addedCsvSheet insertColumnsBefore(int beforePosition, int howMany)
beforePosition
- the column before which the new column should be addedhowMany
- the number of columns to insertCsvSheet deleteColumn(int columnPosition)
columnPosition
- the position of the column, starting at 1 for the first columnCsvSheet deleteColumns(int columnPosition, int howMany)
columnPosition
- the position of the first column to deletehowMany
- the number of columns to deleteint getNumRows()
int getNumColumns()
Range getRange(int row, int column)
row
- the row of the cell to returncolumn
- the column of the cell to returnRange
containing only this cellRange getRange(int row, int column, int numRows, int numColumns)
row
- the starting row of the rangecolumn
- the starting column of the rangenumRows
- the number of rows to returnnumColumns
- the number of columns to returnRange
corresponding to the area specifiedRange getActiveRange()
Range setActiveRange(Range range)
range
- the range to set as the active rangeRange getActiveCell()
Range getRange()
Range
containing all the cellsCsvSheet sort(java.lang.Object sortSpecObj)
sortSpecObj
- TODO