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 TreeTableNode

    java.lang.Object
      |
      +--javax.swing.tree.DefaultMutableTreeNode
            |
            +--com.smardec.asc.treetable.TreeTableNode

All Implemented Interfaces:
  java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class TreeTableNode
extends javax.swing.tree.DefaultMutableTreeNode

Sample implementation of `TreeTable` node. It extends `DefaultMutableTreeNode` and manages the list of it's column values.

Field Summary
`protected java.util.List` | `columnValues` List of column values.

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
`allowsChildren, children, EMPTY_ENUMERATION, parent, userObject`

Constructor Summary
`TreeTableNode(java.util.List columnValues)` Creates a tree node with specified column values.
`TreeTableNode(java.lang.Object[] columnValues)` Creates a tree node with specified column values.

Method Summary
`java.lang.Object` | `getValueAt(int index)` Returns value for the column.
`boolean` | `isEditable(int index)` Indicates whether the value for the column is editable.
`void` | `setValueAt(java.lang.Object value, int index)` Sets the value for the column.
`java.lang.String` | `toString()` Returns string presentation of the first value in the list.

Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
`add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject`

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

Field Detail

### columnValues

    protected java.util.List columnValues

  List of column values.

Constructor Detail

### TreeTableNode

    public TreeTableNode(java.util.List columnValues)

  Creates a tree node with specified column values.

Parameters:
  `columnValues` - list of column values

### TreeTableNode

    public TreeTableNode(java.lang.Object[] columnValues)

  Creates a tree node with specified column values.

Parameters:
  `columnValues` - array of column values

Method Detail

### toString

    public java.lang.String toString()

  Returns string presentation of the first value in the list. It is needed to show this value in the JTree.

  Overrides:
    `toString` in class `javax.swing.tree.DefaultMutableTreeNode`
  Returns:
    string presentation of the node.

### getValueAt

    public java.lang.Object getValueAt(int index)

  Returns value for the column.

  Parameters:
    `index` - index of the column
  Returns:
    value for the column.

### isEditable

    public boolean isEditable(int index)

  Indicates whether the value for the column is editable.

  Parameters:
    `index` - index of the column
  Returns:
    `true` if the value is editable, `false` otherwise.

### setValueAt

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

  Sets the value for the column.

  Parameters:
    `value` - new value
    `index` - index of the 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.