|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
ch.randelshofer.gui.table.TreeNodeTableModel
ch.randelshofer.cubetwister.doc.NotationMacrosTableModel
public class NotationMacrosTableModel
Wraps the macros provided by NotationModel to make them accessible by a MutableJTable.
| Field Summary |
|---|
| Fields inherited from class ch.randelshofer.gui.table.TreeNodeTableModel |
|---|
treeModel, treeNode |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
NotationMacrosTableModel()
|
|
| Method Summary | |
|---|---|
void |
createRow(int row,
java.lang.Object type)
Invoke this to insert a new row into the table. |
java.awt.datatransfer.Transferable |
exportRowTransferable(int[] rows)
Creates a Transferable to use as the source for a data transfer of the specified elements. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex. |
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 children that may be created at this row. |
NotationModel |
getModel()
|
java.lang.Object |
getValueAt(int row,
int column)
Returns the value for the cell at columnIndex and rowIndex. |
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. |
void |
insertRow(java.lang.Object type,
int row)
Invoke this to insert a new row into the table. |
boolean |
isCellEditable(int row,
int column)
Returns true if the cell at rowIndex and columnIndex is editable. |
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. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
setModel(NotationModel m)
|
void |
setValueAt(java.lang.Object aValue,
int row,
int column)
Sets the value in the cell at columnIndex and rowIndex to aValue is the new value. |
| Methods inherited from class ch.randelshofer.gui.table.TreeNodeTableModel |
|---|
getRow, getRowActions, getRowCount, isRowAddable, isRowRemovable, removeRow, setModel, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged |
| 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 |
| Constructor Detail |
|---|
public NotationMacrosTableModel()
| Method Detail |
|---|
public void setModel(NotationModel m)
public NotationModel getModel()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListener
public void insertRow(java.lang.Object type,
int row)
row - index of the new row.
java.lang.IllegalStateException - if the row may not be inserted.
public java.lang.Object getValueAt(int row,
int column)
getValueAt in interface javax.swing.table.TableModelgetValueAt in class TreeNodeTableModelrow - the row whose value is to be looked upcolumn - the column whose value is to be looked up
public java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumnIndex - the index of column
public boolean isCellEditable(int row,
int column)
isCellEditable in interface MutableTableModelisCellEditable in interface javax.swing.table.TableModelisCellEditable in class TreeNodeTableModelrow - the row whose value is to be looked upcolumn - the column whose value is to be looked up
setValueAt(java.lang.Object, int, int)
public void setValueAt(java.lang.Object aValue,
int row,
int column)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelaValue - the new valuerow - the row whose value is to be changedcolumn - the column whose value is to be changedgetValueAt(int, int),
isCellEditable(int, int)public int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelgetColumnCount in class TreeNodeTableModelTreeNodeTableModel.getRowCount()public java.lang.Object[] getCreatableRowTypes(int row)
TreeNodeTableModel
getCreatableRowTypes in interface MutableTableModelgetCreatableRowTypes in class TreeNodeTableModelrow - a row.
public java.lang.Object getCreatableRowType(int row)
MutableTableModel
getCreatableRowType in interface MutableTableModelgetCreatableRowType in class TreeNodeTableModelrow - The insertion point. 0 <= index <= getRowCount()
public void createRow(int row,
java.lang.Object type)
createRow in interface MutableTableModelcreateRow in class TreeNodeTableModelrow - index of the new row.type - element type to be inserted.
java.lang.IllegalStateException - if the row may not be inserted.public java.awt.datatransfer.Transferable exportRowTransferable(int[] rows)
exportRowTransferable in interface MutableTableModelexportRowTransferable in class TreeNodeTableModelrows - Row indices.
public int importRowTransferable(java.awt.datatransfer.Transferable t,
int action,
int row,
boolean asChild)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
importRowTransferable in interface MutableTableModelimportRowTransferable in class TreeNodeTableModelt - The transfer dataList.action - The action DnDConstants.ACTION_COPY, .ACTION_MOVE or
.ACTION_LINK.row - The insertion point. 0 <= index <= getSize()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
public boolean isRowImportable(java.awt.datatransfer.DataFlavor[] transferFlavors,
int action,
int row,
boolean asChild)
TreeNodeTableModel
isRowImportable in interface MutableTableModelisRowImportable in class TreeNodeTableModeltransferFlavors - 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
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||