public class NodeTableModel extends AbstractTableModel
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).listenerList| Constructor and Description |
|---|
NodeTableModel() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAtpublic 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 columnpublic int getRowCount()
public int getColumnCount()
public Object getValueAt(int row, int column)
row - table row indexcolumn - table column indexpublic boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrow - table row indexcolumn - table column indexpublic Class getColumnClass(int column)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumn - table column indexNode.Property.classpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcolumn - table column indexBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.