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

## com.tonbeller.wcf.tree
Interface TreeModel

All Known Subinterfaces:
  MutableTreeModel

All Known Implementing Classes:
  AbstractTreeModel, EmptyTreeModel, FilteringTreeModelDecorator, MutableTreeModelDecorator, TreeModelDecorator

public interface TreeModel

exposes parent/child relationship between objects.

Author:
  av

Field Summary
`static TreeModel` | `EMPTY_MODEL`

Method Summary
`void` | `addTreeModelChangeListener(TreeModelChangeListener l)`
`void` | `fireModelChanged(boolean identityChanged)` fires a TreeModelChangeEvent.
`java.lang.Object[]` | `getChildren(java.lang.Object node)`
`java.lang.Object` | `getParent(java.lang.Object node)`
`java.lang.Object[]` | `getRoots()` returns the root members of the tree.
`boolean` | `hasChildren(java.lang.Object node)`
`void` | `removeTreeModelChangeListener(TreeModelChangeListener l)`

Field Detail

### EMPTY_MODEL

    public static final TreeModel EMPTY_MODEL

Method Detail

### getRoots

    public java.lang.Object[] getRoots()

  returns the root members of the tree.

### hasChildren

    public boolean hasChildren(java.lang.Object node)

  Returns:
    true if the member can be expanded

### getChildren

    public java.lang.Object[] getChildren(java.lang.Object node)

  Returns:
    the children of the member

### getParent

    public java.lang.Object getParent(java.lang.Object node)

  Returns:
    the parent of member or null, if this is a root member

### addTreeModelChangeListener

    public void addTreeModelChangeListener(TreeModelChangeListener l)

### removeTreeModelChangeListener

    public void removeTreeModelChangeListener(TreeModelChangeListener l)

### fireModelChanged

    public void fireModelChanged(boolean identityChanged)

  fires a TreeModelChangeEvent.

  Parameters:
    `identityChanged` - if true, the identities of the tree nodes have changed and, for example, the selection will be cleared.

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