|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | 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
).
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, 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)
props
- rowspublic void setProperties(Node.Property[] props)
nodes
- columnsprotected Node.Property getPropertyFor(Node node, Node.Property prop)
node
- represents single rowprop
- represents columnpublic int getRowCount()
getRowCount
in class AbstractTableModel
public int getColumnCount()
getColumnCount
in class AbstractTableModel
public Object getValueAt(int row, int column)
getValueAt
in class AbstractTableModel
row
- table row indexcolumn
- table column indexpublic boolean isCellEditable(int row, int column)
isCellEditable
in class AbstractTableModel
row
- table row indexcolumn
- table column indexpublic Class getColumnClass(int column)
getColumnClass
in class AbstractTableModel
column
- table column indexNode.Property.class
public String getColumnName(int column)
getColumnName
in class AbstractTableModel
column
- table column index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |