|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel org.openide.explorer.view.NodeTableModel
Table model with properties (Node.Property
) as columns and nodes (Node
) as rows.
It is used as model for displaying node properties in table. Each column is represented by
Node.Property
object. Each row is represented by Node
object.
Each cell contains Node.Property
property which equals with column object
and should be in property sets of row representant (Node
).
Field Summary |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
NodeTableModel()
|
Method Summary | |
Class |
getColumnClass(int column)
Getter for column class. |
int |
getColumnCount()
Getter for column count. |
String |
getColumnName(int column)
Getter for column name |
protected Node.Property |
getPropertyFor(Node node,
Node.Property prop)
Returns node property if found in nodes property sets. |
int |
getRowCount()
Getter for row count. |
Object |
getValueAt(int row,
int column)
Getter for property. |
boolean |
isCellEditable(int row,
int column)
Cell is editable only if it has non null value. |
void |
setNodes(Node[] nodes)
Set rows. |
void |
setProperties(Node.Property[] props)
Set columns. |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeTableModel()
Method Detail |
public void setNodes(Node[] nodes)
nodes
- the rowspublic void setProperties(Node.Property[] props)
props
- the columnsprotected Node.Property getPropertyFor(Node node, Node.Property prop)
node
- represents single rowprop
- represents column
public int getRowCount()
public int getColumnCount()
public Object getValueAt(int row, int column)
row
- table row indexcolumn
- table column index
public boolean isCellEditable(int row, int column)
row
- table row indexcolumn
- table column index
public Class getColumnClass(int column)
column
- table column index
Node.Property.class
public String getColumnName(int column)
column
- table column index
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |