Package jadex.commons.gui.jtreetable
Class DefaultTreeTableModel
- java.lang.Object
 - 
- jadex.commons.gui.jtreetable.AbstractTreeTableModel
 - 
- jadex.commons.gui.jtreetable.DefaultTreeTableModel
 
 
 
- 
- All Implemented Interfaces:
 TreeTableModel,javax.swing.tree.TreeModel
public class DefaultTreeTableModel extends AbstractTreeTableModel
Default implementation of the TreeTableModel interface. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]columnsThe column names.protected boolean[]editableThe editable columns.protected TreeTableNoderootThe root node.- 
Fields inherited from class jadex.commons.gui.jtreetable.AbstractTreeTableModel
listenerList 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DefaultTreeTableModel(TreeTableNode root, java.lang.String[] columns)Create a new tree table model with the given root node and column names.DefaultTreeTableModel(TreeTableNode root, java.lang.String[] columns, boolean[] editable)Create a new tree table model with the given root node and column names. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetChild(java.lang.Object node, int index)Get a child of a node.intgetChildCount(java.lang.Object node)Get the number of children of a node.java.lang.ClassgetColumnClass(int column)Get the class of a column.intgetColumnCount()Get the number of columns.java.lang.StringgetColumnName(int column)Get the name of a column.java.lang.ObjectgetValueAt(java.lang.Object node, int column)Get the number of children of a node.booleanisCellEditable(java.lang.Object node, int column)Test if a cell is editable- 
Methods inherited from class jadex.commons.gui.jtreetable.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getPathToRoot, getPathToRoot, getRoot, isLeaf, reload, removeTreeModelListener, setValueAt, valueForPathChanged 
 - 
 
 - 
 
- 
- 
Field Detail
- 
root
protected TreeTableNode root
The root node. 
- 
columns
protected java.lang.String[] columns
The column names. 
- 
editable
protected boolean[] editable
The editable columns. 
 - 
 
- 
Constructor Detail
- 
DefaultTreeTableModel
public DefaultTreeTableModel(TreeTableNode root, java.lang.String[] columns)
Create a new tree table model with the given root node and column names.- Parameters:
 root- The root node.columns- The column names.
 
- 
DefaultTreeTableModel
public DefaultTreeTableModel(TreeTableNode root, java.lang.String[] columns, boolean[] editable)
Create a new tree table model with the given root node and column names.- Parameters:
 root- The root node.columns- The column names.editable- The editable columns.
 
 - 
 
- 
Method Detail
- 
getColumnClass
public java.lang.Class getColumnClass(int column)
Get the class of a column.- Specified by:
 getColumnClassin interfaceTreeTableModel- Overrides:
 getColumnClassin classAbstractTreeTableModel- Parameters:
 column- The column.- Returns:
 - The class.
 
 
- 
getChild
public java.lang.Object getChild(java.lang.Object node, int index)Get a child of a node.- Parameters:
 node- The node.index- The index of the child.- Returns:
 - The child at the specified index.
 
 
- 
getChildCount
public int getChildCount(java.lang.Object node)
Get the number of children of a node.- Parameters:
 node- The node.- Returns:
 - The number of children of a node.
 
 
- 
getValueAt
public java.lang.Object getValueAt(java.lang.Object node, int column)Get the number of children of a node.- Parameters:
 node- The node.column- The column.- Returns:
 - The node's value at the specified column.
 
 
- 
getColumnCount
public int getColumnCount()
Get the number of columns.- Returns:
 - The number of columns.
 
 
- 
getColumnName
public java.lang.String getColumnName(int column)
Get the name of a column.- Parameters:
 column- The column.- Returns:
 - The name of the column.
 
 
- 
isCellEditable
public boolean isCellEditable(java.lang.Object node, int column)Test if a cell is editable- Specified by:
 isCellEditablein interfaceTreeTableModel- Overrides:
 isCellEditablein classAbstractTreeTableModel
 
 - 
 
 -