Holger's Java API

## com.antelmann.util.gui
Class SubTreeModel

    java.lang.Object
      com.antelmann.util.gui.SubTreeModel

All Implemented Interfaces:
  Wrapped<TreeModel>, TreeModel

    public class SubTreeModel

extends Object
implements TreeModel, Wrapped<TreeModel>

represents a specific branch of a given wrapped tree model.

Since:
  10.08.2011, 01:08:05
Author:
  holger

Constructor Summary
`SubTreeModel(TreeModel model, TreePath root)`

Method Summary
`void` `addTreeModelListener(TreeModelListener l)`
`Object` `getChild(Object parent, int index)`
`int` `getChildCount(Object parent)`
`int` `getIndexOfChild(Object parent, Object child)`
`Object` `getRoot()`
`boolean` `isLeaf(Object node)`
`void` `removeTreeModelListener(TreeModelListener l)`
`TreeModel` `unwrap()` returns the embedded instance that this wrapper encloses
`void` `valueForPathChanged(TreePath path, Object newValue)`

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

Constructor Detail

### SubTreeModel

    public SubTreeModel(TreeModel model,
                        TreePath root)

Method Detail

### unwrap

    public TreeModel unwrap()

  Description copied from interface: `Wrapped`
  returns the embedded instance that this wrapper encloses

  Specified by:
    `unwrap` in interface `Wrapped<TreeModel>`

### getRoot

    public Object getRoot()

  Specified by:
    `getRoot` in interface `TreeModel`

### getChild

    public Object getChild(Object parent,
                           int index)

  Specified by:
    `getChild` in interface `TreeModel`

### getChildCount

    public int getChildCount(Object parent)

  Specified by:
    `getChildCount` in interface `TreeModel`

### isLeaf

    public boolean isLeaf(Object node)

  Specified by:
    `isLeaf` in interface `TreeModel`

### valueForPathChanged

    public void valueForPathChanged(TreePath path,
                                    Object newValue)

  Specified by:
    `valueForPathChanged` in interface `TreeModel`

### getIndexOfChild

    public int getIndexOfChild(Object parent,
                               Object child)

  Specified by:
    `getIndexOfChild` in interface `TreeModel`

### addTreeModelListener

    public void addTreeModelListener(TreeModelListener l)

  Specified by:
    `addTreeModelListener` in interface `TreeModel`

### removeTreeModelListener

    public void removeTreeModelListener(TreeModelListener l)

  Specified by:
    `removeTreeModelListener` in interface `TreeModel`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads