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 SummaryFields 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.AbstractTreeTableModellistenerList
 
- 
 - 
Constructor SummaryConstructors 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 SummaryAll 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.AbstractTreeTableModeladdTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getPathToRoot, getPathToRoot, getRoot, isLeaf, reload, removeTreeModelListener, setValueAt, valueForPathChanged
 
- 
 
- 
- 
- 
Field Detail- 
rootprotected TreeTableNode root The root node.
 - 
columnsprotected java.lang.String[] columns The column names.
 - 
editableprotected boolean[] editable The editable columns.
 
- 
 - 
Constructor Detail- 
DefaultTreeTableModelpublic 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.
 
 - 
DefaultTreeTableModelpublic 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- 
getColumnClasspublic java.lang.Class getColumnClass(int column) Get the class of a column.- Specified by:
- getColumnClassin interface- TreeTableModel
- Overrides:
- getColumnClassin class- AbstractTreeTableModel
- Parameters:
- column- The column.
- Returns:
- The class.
 
 - 
getChildpublic 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.
 
 - 
getChildCountpublic 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.
 
 - 
getValueAtpublic 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.
 
 - 
getColumnCountpublic int getColumnCount() Get the number of columns.- Returns:
- The number of columns.
 
 - 
getColumnNamepublic java.lang.String getColumnName(int column) Get the name of a column.- Parameters:
- column- The column.
- Returns:
- The name of the column.
 
 - 
isCellEditablepublic boolean isCellEditable(java.lang.Object node, int column)Test if a cell is editable- Specified by:
- isCellEditablein interface- TreeTableModel
- Overrides:
- isCellEditablein class- AbstractTreeTableModel
 
 
- 
 
-