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

## j3deditor.bin.hierarchy.view
Class HTreeModel

    java.lang.Object
      j3deditor.bin.hierarchy.view.HTreeModel

All Implemented Interfaces:
  javax.swing.tree.TreeModel

    public class HTreeModel

extends java.lang.Object
implements javax.swing.tree.TreeModel

Custom `TreeModel` for `JTree` that visualizes hierarchy.

Author:
  Risto Seene

Constructor Summary
`HTreeModel(java.lang.Object root)` Creates an instance of `HTreeModel` with the given root node.

Method Summary
`void` | `addTreeModelListener(javax.swing.event.TreeModelListener tml)` Not in use.
`java.lang.Object` | `getChild(java.lang.Object node, int index)` Returns the child of the given node at the specified index.
`int` | `getChildCount(java.lang.Object node)` Returns the number of children the given node has.
`int` | `getIndexOfChild(java.lang.Object parent, java.lang.Object child)` Returns the index of the given child of the given node.
`java.lang.Object` | `getRoot()` Returns the root node of this tree model.
`boolean` | `isLeaf(java.lang.Object node)` Tests if the given node has children.
`void` | `removeTreeModelListener(javax.swing.event.TreeModelListener tml)` Not in use.
`void` | `valueForPathChanged(javax.swing.tree.TreePath tp, java.lang.Object ob)` Not in use.

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

Constructor Detail

### HTreeModel

    public HTreeModel(java.lang.Object root)

  Creates an instance of `HTreeModel` with the given root node.

  Parameters:
    `root` - root node for this tree model

Method Detail

### addTreeModelListener

    public void addTreeModelListener(javax.swing.event.TreeModelListener tml)

  Not in use.

  Specified by:
    `addTreeModelListener` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `tml` - doesn't do anything

### getChild

    public java.lang.Object getChild(java.lang.Object node,
                                     int index)

  Returns the child of the given node at the specified index.

  Specified by:
    `getChild` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `node` - node which child will be returned
    `index` - index of the requested child
  Returns:
    Returns the child of the given node at the specified index

### getChildCount

    public int getChildCount(java.lang.Object node)

  Returns the number of children the given node has.

  Specified by:
    `getChildCount` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `node` - node which child count is requested
  Returns:
    Returns the number of children the given node has

### getIndexOfChild

    public int getIndexOfChild(java.lang.Object parent,
                               java.lang.Object child)

  Returns the index of the given child of the given node.

  Specified by:
    `getIndexOfChild` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `parent` - node which childs index is requested
    `child` - node which index is requested
  Returns:
    Returns the index of the given child of the given node

### getRoot

    public java.lang.Object getRoot()

  Returns the root node of this tree model.

  Specified by:
    `getRoot` in interface `javax.swing.tree.TreeModel`
  Returns:
    Returns the root node of this tree model

### isLeaf

    public boolean isLeaf(java.lang.Object node)

  Tests if the given node has children.

  Specified by:
    `isLeaf` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `node` - node that that will be tested
  Returns:
    Returns `true` if the given node has no children, otherwise `false`

### removeTreeModelListener

    public void removeTreeModelListener(javax.swing.event.TreeModelListener tml)

  Not in use.

  Specified by:
    `removeTreeModelListener` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `tml` - doesn't do anything

### valueForPathChanged

    public void valueForPathChanged(javax.swing.tree.TreePath tp,
                                    java.lang.Object ob)

  Not in use.

  Specified by:
    `valueForPathChanged` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `tp` - doesn't do anything
    `ob` - doesn't do anything

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