|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel dsto.dfc.swing.table.AbstractDfcTableModel dsto.dfc.swing.table.ProxyTableModel
public class ProxyTableModel
Generic base class for a table model that act as a proxy for another table model. All calls are by default forwarded to the enclosed table model, events are forwarded out (but with the source changed to the proxy).
Field Summary | |
---|---|
protected DfcTableModel |
model
|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
ProxyTableModel(DfcTableModel model)
|
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 columnStart,
int columnEnd)
Test if a deleteColumns () operation is supported. |
boolean |
canDeleteRows(int rowStart,
int rowEnd)
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 rowStart,
int rowEnd)
Test if an insertRows () operation is supported. |
boolean |
canMoveRows(int startRow,
int endRow,
int newStartRow)
|
boolean |
canPasteCells(Transferable transferable,
int startRow,
int endRow,
int startColumn,
int endColumn)
Should return true if rows may be pasted from a given Transferable into a block of cells. |
boolean |
canPasteRows(Transferable transferable,
int rowStart)
Should return true if rows may be pasted from a given Transferable at the given row. |
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 columnStart,
int columnEnd)
Delete columns. |
void |
deleteRows(int rowStart,
int rowEnd)
Delete rows. |
int |
getColumnCount()
|
String |
getColumnName(int column)
|
int |
getRowCount()
|
DfcTableModel |
getSubModel()
|
Object |
getValueAt(int row,
int col)
|
void |
insertColumn(int columnIndex,
String columnName,
Class columnClass)
Insert a new column containing blank values. |
void |
insertRows(int rowStart,
int rowEnd)
Insert empty rows. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
moveRows(int startRow,
int endRow,
int newStartRow)
|
void |
pasteCells(Transferable transferable,
int startRow,
int endRow,
int startColumn,
int endColumn)
|
void |
pasteRows(Transferable transferable,
int rowStart)
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
|
void |
tableChanged(TableModelEvent e)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnClass, removeTableModelListener |
Field Detail |
---|
protected DfcTableModel model
Constructor Detail |
---|
public ProxyTableModel(DfcTableModel model)
Method Detail |
---|
public DfcTableModel getSubModel()
public int getColumnCount()
getColumnCount
in interface TableModel
public Object getValueAt(int row, int col)
getValueAt
in interface TableModel
public int getRowCount()
getRowCount
in interface TableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public boolean canMoveRows(int startRow, int endRow, int newStartRow)
canMoveRows
in interface DfcTableModel
canMoveRows
in class AbstractDfcTableModel
public boolean canPasteRows(Transferable transferable, int rowStart)
DfcTableModel
canPasteRows
in interface DfcTableModel
canPasteRows
in class AbstractDfcTableModel
transferable
- The transferable.rowStart
- The row to insert the transferable at.
public void deleteRows(int rowStart, int rowEnd) throws UnsupportedOperationException
DfcTableModel
deleteRows
in interface DfcTableModel
deleteRows
in class AbstractDfcTableModel
rowStart
- The row to begin inserting.rowEnd
- The last row to delete.
UnsupportedOperationException
- if this is not supported.DfcTableModel.canDeleteRows(int, int)
public void deleteColumns(int columnStart, int columnEnd) throws UnsupportedOperationException
DfcTableModel
deleteColumns
in interface DfcTableModel
deleteColumns
in class AbstractDfcTableModel
columnStart
- The index of the first column.columnEnd
- The index of the last column.
UnsupportedOperationException
DfcTableModel.canDeleteColumns(int, int)
public boolean canCopyRows(int startRow, int endRow)
canCopyRows
in interface DfcTableModel
canCopyRows
in class AbstractDfcTableModel
public boolean canInsertRows(int rowStart, int rowEnd)
DfcTableModel
canInsertRows
in interface DfcTableModel
canInsertRows
in class AbstractDfcTableModel
rowStart
- The row to begin inserting.rowEnd
- The number of rows to insert.
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
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 pasteCells(Transferable transferable, int startRow, int endRow, int startColumn, int endColumn) throws IOException, CloneNotSupportedException, UnsupportedFlavorException, UnsupportedOperationException
pasteCells
in interface DfcTableModel
pasteCells
in class AbstractDfcTableModel
IOException
CloneNotSupportedException
UnsupportedFlavorException
UnsupportedOperationException
public boolean canDeleteRows(int rowStart, int rowEnd)
DfcTableModel
canDeleteRows
in interface DfcTableModel
canDeleteRows
in class AbstractDfcTableModel
rowStart
- The row to begin inserting.rowEnd
- The last row to delete.
public Transferable copyRows(int startRow, int endRow) throws CloneNotSupportedException, UnsupportedOperationException
copyRows
in interface DfcTableModel
copyRows
in class AbstractDfcTableModel
CloneNotSupportedException
UnsupportedOperationException
public Transferable copyCells(int startRow, int endRow, int startColumn, int endColumn) throws CloneNotSupportedException, UnsupportedOperationException
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.
UnsupportedOperationException
DfcTableModel.canCopyRows(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 moveRows(int startRow, int endRow, int newStartRow) throws UnsupportedOperationException
moveRows
in interface DfcTableModel
moveRows
in class AbstractDfcTableModel
UnsupportedOperationException
public boolean canDeleteColumns(int columnStart, int columnEnd)
DfcTableModel
canDeleteColumns
in interface DfcTableModel
canDeleteColumns
in class AbstractDfcTableModel
columnStart
- The index of the first column.columnEnd
- The index of the last column.
public boolean canPasteCells(Transferable transferable, int startRow, int endRow, int startColumn, int endColumn)
DfcTableModel
canPasteCells
in interface DfcTableModel
canPasteCells
in class AbstractDfcTableModel
transferable
- The transferable.startRow
- The row to insert the transferable at.
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public void pasteRows(Transferable transferable, int rowStart) throws IOException, CloneNotSupportedException, UnsupportedFlavorException, UnsupportedOperationException
pasteRows
in interface DfcTableModel
pasteRows
in class AbstractDfcTableModel
IOException
CloneNotSupportedException
UnsupportedFlavorException
UnsupportedOperationException
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 void insertRows(int rowStart, int rowEnd)
DfcTableModel
insertRows
in interface DfcTableModel
insertRows
in class AbstractDfcTableModel
rowStart
- The row to begin inserting.rowEnd
- The number of rows to insert.DfcTableModel.canInsertRows(int, int)
public void deleteCells(int startRow, int endRow, int startColumn, int endColumn) throws UnsupportedOperationException
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.
UnsupportedOperationException
DfcTableModel.canDeleteCells(int, int, int, int)
public void insertColumn(int columnIndex, String columnName, Class columnClass) throws UnsupportedOperationException
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.
UnsupportedOperationException
DfcTableModel.canInsertColumn(int, java.lang.String, java.lang.Class)
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |