Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.smardec.asc.treetable
Class DefaultTreeTableModel

    java.lang.Object
      |
      +--javax.swing.tree.DefaultTreeModel
            |
            +--com.smardec.asc.treetable.DefaultTreeTableModel

All Implemented Interfaces:
  java.io.Serializable, javax.swing.tree.TreeModel, TreeTableModel

public class DefaultTreeTableModel
extends javax.swing.tree.DefaultTreeModel
implements TreeTableModel

Sample `TreeTableModel` implementation.

Field Summary
`protected java.lang.Class[]` | `columnClasses` Classes of columns.
`protected java.lang.String[]` | `columnNames` Names of columns.

Fields inherited from class javax.swing.tree.DefaultTreeModel
`asksAllowsChildren, listenerList, root`

Constructor Summary
`DefaultTreeTableModel(TreeTableNode root)` Creates `DefaultTreeTableModel` object with specified root.

Method Summary
`java.lang.Class` | `getColumnClass(int column)` Returns column's class.
`int` | `getColumnCount()` Returns the number of columns.
`java.lang.String` | `getColumnName(int column)` Returns column's name.
`java.lang.Object` | `getValueAt(java.lang.Object node, int column)` Returns the value displayed for node `node` at column index `column`.
`boolean` | `isCellEditable(java.lang.Object node, int column)` Indicates whether the value for node `node` at column index `column` is editable.
`void` | `setValueAt(java.lang.Object value, java.lang.Object node, int column)` Sets the value for node `node` at column index `column`.

Methods inherited from class javax.swing.tree.DefaultTreeModel
`addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.swing.tree.TreeModel
`addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged`

Field Detail

### columnNames

    protected java.lang.String[] columnNames

  Names of columns.

### columnClasses

    protected java.lang.Class[] columnClasses

  Classes of columns.

Constructor Detail

### DefaultTreeTableModel

    public DefaultTreeTableModel(TreeTableNode root)

  Creates `DefaultTreeTableModel` object with specified root.

Parameters:
  `root` - root of the tree

Method Detail

### getColumnCount

    public int getColumnCount()

  Returns the number of columns.

  Specified by:
    `getColumnCount` in interface `TreeTableModel`
  Returns:
    the number of columns.

### getColumnName

    public java.lang.String getColumnName(int column)

  Returns column's name.

  Specified by:
    `getColumnName` in interface `TreeTableModel`
  Parameters:
    `column` - index of column
  Returns:
    column's name.

### getColumnClass

    public java.lang.Class getColumnClass(int column)

  Returns column's class.

  Specified by:
    `getColumnClass` in interface `TreeTableModel`
  Parameters:
    `column` - index of column
  Returns:
    column's class.

### getValueAt

    public java.lang.Object getValueAt(java.lang.Object node,
                                       int column)

  Returns the value displayed for node `node` at column index `column`.

  Specified by:
    `getValueAt` in interface `TreeTableModel`
  Parameters:
    `node` - tree node
    `column` - index of column
  Returns:
    displayed value.

### isCellEditable

    public boolean isCellEditable(java.lang.Object node,
                                  int column)

  Indicates whether the value for node `node` at column index `column` is editable.

  Specified by:
    `isCellEditable` in interface `TreeTableModel`
  Parameters:
    `node` - tree node
    `column` - index of column
  Returns:
    `true` if the value is editable, `false` otherwise.

### setValueAt

    public void setValueAt(java.lang.Object value,
                           java.lang.Object node,
                           int column)

  Sets the value for node `node` at column index `column`.

  Specified by:
    `setValueAt` in interface `TreeTableModel`
  Parameters:
    `value` - new value
    `node` - tree node
    `column` - index of column

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006 Smardec. All Rights Reserved.