|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
dsto.dfc.swing.table.AbstractDfcTableModel
dsto.dfc.swing.table.DefaultDfcTableModel
public class DefaultDfcTableModel
Fully dynamic implementation of DfcTableModel backed by ArrayList's.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultDfcTableModel()
|
|
DefaultDfcTableModel(TableModel model,
int startRow,
int endRow,
int startColumn,
int endColumn)
Create a new table model from a rectangular section of an existing table. |
Method Summary | |
---|---|
boolean |
canCopyCells(int startRow,
int endRow,
int startColumn,
int endColumn)
Test if a copyCells () operation is permitted. |
boolean |
canCopyRows(int startRow,
int endRow)
|
boolean |
canDeleteCells(int startRow,
int endRow,
int startColumn,
int endColumn)
Test if a deleteCells () operation is permitted. |
boolean |
canDeleteColumns(int startColumn,
int endColumn)
Test if a deleteColumns () operation is supported. |
boolean |
canDeleteRows(int startRow,
int endRow)
Test if a deleteRows () operation is supported. |
boolean |
canInsertColumn(int columnIndex,
String columnName,
Class columnClass)
Test if an insertColumn () operation is supported. |
boolean |
canInsertRows(int startRow,
int rowCount)
Test if an insertRows () operation is supported. |
boolean |
canMoveRows(int startRow,
int endRow,
int newStartRow)
|
boolean |
canPasteRows(Transferable transferable,
int startRow)
Should return true if rows may be pasted from a given Transferable at the given row. |
Object |
clone()
Create a completely separate copy of this object and any mutable objects owned by the object. |
Transferable |
copyCells(int startRow,
int endRow,
int startColumn,
int endColumn)
Copy a rectangular block of cells into an AWT Transferable. |
Transferable |
copyRows(int startRow,
int endRow)
|
void |
deleteCells(int startRow,
int endRow,
int startColumn,
int endColumn)
Delete a rectangular block of cells. |
void |
deleteColumns(int startColumn,
int endColumn)
Delete columns. |
void |
deleteRows(int startRow,
int endRow)
Delete rows. |
Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
String |
getColumnName(int columnIndex)
|
int |
getRowCount()
|
Object |
getValueAt(int rowIndex,
int columnIndex)
|
void |
insertColumn(int columnIndex,
String columnName,
Class columnClass)
Insert a new column containing blank values. |
void |
insertRows(int startRow,
int rowCount)
Insert empty rows. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
moveRows(int startRow,
int endRow,
int newStartRow)
|
void |
pasteRows(Transferable transferable,
int startRow)
|
void |
setValueAt(Object value,
int rowIndex,
int columnIndex)
|
Methods inherited from class dsto.dfc.swing.table.AbstractDfcTableModel |
---|
canPasteCells, pasteCells |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface dsto.dfc.swing.table.DfcTableModel |
---|
canPasteCells, pasteCells |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, removeTableModelListener |
Constructor Detail |
---|
public DefaultDfcTableModel()
public DefaultDfcTableModel(TableModel model, int startRow, int endRow, int startColumn, int endColumn) throws CloneNotSupportedException
CloneNotSupportedException
Method Detail |
---|
public int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public Class getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public void setValueAt(Object value, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public void insertRows(int startRow, int rowCount)
DfcTableModel
insertRows
in interface DfcTableModel
insertRows
in class AbstractDfcTableModel
startRow
- The row to begin inserting.rowCount
- The number of rows to insert.DfcTableModel.canInsertRows(int, int)
public void deleteRows(int startRow, int endRow)
DfcTableModel
deleteRows
in interface DfcTableModel
deleteRows
in class AbstractDfcTableModel
startRow
- The row to begin inserting.endRow
- The last row to delete.DfcTableModel.canDeleteRows(int, int)
public boolean canInsertRows(int startRow, int rowCount)
DfcTableModel
canInsertRows
in interface DfcTableModel
canInsertRows
in class AbstractDfcTableModel
startRow
- The row to begin inserting.rowCount
- The number of rows to insert.
public boolean canDeleteRows(int startRow, int endRow)
DfcTableModel
canDeleteRows
in interface DfcTableModel
canDeleteRows
in class AbstractDfcTableModel
startRow
- The row to begin inserting.endRow
- The last row to delete.
public boolean canMoveRows(int startRow, int endRow, int newStartRow)
canMoveRows
in interface DfcTableModel
canMoveRows
in class AbstractDfcTableModel
public boolean moveRows(int startRow, int endRow, int newStartRow) throws UnsupportedOperationException
moveRows
in interface DfcTableModel
moveRows
in class AbstractDfcTableModel
UnsupportedOperationException
public void insertColumn(int columnIndex, String columnName, Class columnClass)
DfcTableModel
insertColumn
in interface DfcTableModel
insertColumn
in class AbstractDfcTableModel
columnIndex
- The index for the new column.columnName
- The name of the new column. May be null to
indicate automatic name.columnClass
- The class of values in the column.DfcTableModel.canInsertColumn(int, java.lang.String, java.lang.Class)
public void deleteColumns(int startColumn, int endColumn)
DfcTableModel
deleteColumns
in interface DfcTableModel
deleteColumns
in class AbstractDfcTableModel
startColumn
- The index of the first column.endColumn
- The index of the last column.DfcTableModel.canDeleteColumns(int, int)
public boolean canInsertColumn(int columnIndex, String columnName, Class columnClass)
DfcTableModel
canInsertColumn
in interface DfcTableModel
canInsertColumn
in class AbstractDfcTableModel
columnIndex
- The index for the new column.columnName
- The name of the new column. May be null to indicate
automatic name.columnClass
- The class of values in the column.
public boolean canDeleteColumns(int startColumn, int endColumn)
DfcTableModel
canDeleteColumns
in interface DfcTableModel
canDeleteColumns
in class AbstractDfcTableModel
startColumn
- The index of the first column.endColumn
- The index of the last column.
public boolean canDeleteCells(int startRow, int endRow, int startColumn, int endColumn)
DfcTableModel
canDeleteCells
in interface DfcTableModel
canDeleteCells
in class AbstractDfcTableModel
startRow
- The first row to delete.endRow
- The last row to delete.startColumn
- The first column to delete.endColumn
- The last column to delete.
public void deleteCells(int startRow, int endRow, int startColumn, int endColumn)
DfcTableModel
deleteCells
in interface DfcTableModel
deleteCells
in class AbstractDfcTableModel
startRow
- The first row to delete.endRow
- The last row to delete.startColumn
- The first column to delete.endColumn
- The last column to delete.DfcTableModel.canDeleteCells(int, int, int, int)
public boolean canCopyRows(int startRow, int endRow)
canCopyRows
in interface DfcTableModel
canCopyRows
in class AbstractDfcTableModel
public Transferable copyRows(int startRow, int endRow) throws UnsupportedOperationException, CloneNotSupportedException
copyRows
in interface DfcTableModel
copyRows
in class AbstractDfcTableModel
UnsupportedOperationException
CloneNotSupportedException
public boolean canCopyCells(int startRow, int endRow, int startColumn, int endColumn)
DfcTableModel
canCopyCells
in interface DfcTableModel
canCopyCells
in class AbstractDfcTableModel
startRow
- The first row to copy.endRow
- The last row to copy.startColumn
- The first column to copy.endColumn
- The last column to copy.
public Transferable copyCells(int startRow, int endRow, int startColumn, int endColumn) throws CloneNotSupportedException
DfcTableModel
copyCells
in interface DfcTableModel
copyCells
in class AbstractDfcTableModel
startRow
- The first row to copy.endRow
- The last row to copy.startColumn
- The first column to copy.endColumn
- The last column to copy.
CloneNotSupportedException
- if a data item could not be cloned.DfcTableModel.canCopyRows(int, int)
public boolean canPasteRows(Transferable transferable, int startRow)
DfcTableModel
canPasteRows
in interface DfcTableModel
canPasteRows
in class AbstractDfcTableModel
transferable
- The transferable.startRow
- The row to insert the transferable at.
public void pasteRows(Transferable transferable, int startRow) throws UnsupportedOperationException, UnsupportedFlavorException, CloneNotSupportedException, IOException
pasteRows
in interface DfcTableModel
pasteRows
in class AbstractDfcTableModel
UnsupportedOperationException
UnsupportedFlavorException
CloneNotSupportedException
IOException
public Object clone() throws CloneNotSupportedException
Copyable
NOTE: subclasses should not remove the CloneNotSupportedException throws clause if they themselves support subclassing: removing the CloneNotSupportedException declaration stops subclasses from indicating that a clone was not possible.
clone
in interface Copyable
clone
in class Object
CloneNotSupportedException
- if the clone failed or is not
possible.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |