|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MutableTableModel
Specifies the requirements for a mutable table model.
The mutable table model adds the following operations
to the javax.swing.table.TableModel interface:
javax.swing.Action's
for a group of elements
A setter operation for changing the value of an element.
Operations for importing and exporting elements from a
java.awt.transfer.Transferable.
| Method Summary | |
|---|---|
void |
createRow(int row,
java.lang.Object type)
Creates the specified element type at the specified position in this list Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices). |
java.awt.datatransfer.Transferable |
exportRowTransferable(int[] rows)
Creates a Transferable to use as the source for a data transfer of the specified elements. |
java.lang.Object |
getCreatableRowType(int row)
Returns the default type of elements that can be created at the specified index of the list. |
java.lang.Object[] |
getCreatableRowTypes(int row)
Returns the types of elements that can be created at the specified index of the list. |
javax.swing.Action[] |
getRowActions(int[] rows)
Gets actions for the specified rows. |
int |
importRowTransferable(java.awt.datatransfer.Transferable t,
int action,
int row,
boolean asChild)
Causes a transfer to the model from a clipboard or a DND drop operation. |
boolean |
isCellEditable(int row,
int column)
Returns true if the specified cell may be edited. |
boolean |
isRowAddable(int row)
Returns true if a row can be added. |
boolean |
isRowImportable(java.awt.datatransfer.DataFlavor[] transferFlavors,
int action,
int row,
boolean asChild)
Indicates whether the model would accept an import of the given set of data flavors prior to actually attempting to import it. |
boolean |
isRowRemovable(int row)
Returns true if the specified row can be removed. |
void |
removeRow(int row)
Removes an element from the model. |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, removeTableModelListener, setValueAt |
| Method Detail |
|---|
java.lang.Object[] getCreatableRowTypes(int row)
row - The insertion point. 0 <= index <= getRowCount()
java.lang.Object getCreatableRowType(int row)
row - The insertion point. 0 <= index <= getRowCount()
void createRow(int row,
java.lang.Object type)
throws java.lang.IllegalStateException
row - index at which the specified element is to be inserted.type - element type to be inserted.
java.lang.IllegalArgumentException - if the type is not contained in
the array returned by getInsertableTypes(int).
java.lang.IndexOutOfBoundsException - if the index is out of range
(index < 0 || index > size()).
java.lang.IllegalStateExceptionboolean isRowAddable(int row)
row - index of the element. 0 <= index <= getSize()boolean isRowRemovable(int row)
row - index of the element. 0 <= index <= getSize()removeRow(int)
void removeRow(int row)
throws java.lang.IllegalStateException
row - index of the element. 0 <= index <= getSize()
java.lang.IllegalStateException - if the element may not be removed.isRowRemovable(int)
boolean isCellEditable(int row,
int column)
isCellEditable in interface javax.swing.table.TableModelrow - index of the row.column - index of the column.javax.swing.Action[] getRowActions(int[] rows)
rows - The rows.java.awt.datatransfer.Transferable exportRowTransferable(int[] rows)
rows - Row indices.
boolean isRowImportable(java.awt.datatransfer.DataFlavor[] transferFlavors,
int action,
int row,
boolean asChild)
transferFlavors - the data formats availableaction - The action DnDConstants.ACTION_COPY, .ACTION_MOVE or
.ACTION_LINK.row - The insertion point. 0 <= row <= getRowCount()asChild - Indicates that the item is to be imported as a child
of the list item rather than as an individual element
/ of the list.
DnDConstants
int importRowTransferable(java.awt.datatransfer.Transferable t,
int action,
int row,
boolean asChild)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
t - The transfer data.action - The action DnDConstants.ACTION_COPY, .ACTION_MOVE or
.ACTION_LINK.row - The insertion point. 0 <= row <= getRowCount()asChild - Indicates that the item is to be imported as a child
of the list item rather than as an individual element
of the list.
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||