Package docking.widgets.tree.internal

# Class GTreeModel

java.lang.Object
docking.widgets.tree.internal.GTreeModel

All Implemented Interfaces:
  `TreeModel`

public class GTreeModel extends Object implements TreeModel

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GTreeModel(GTreeNode root)`
  Constructs a GTreeModel with the given root node.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addTreeModelListener(TreeModelListener l)`
  `void`
  `dispose()`
  `void`
  `fireNodeAdded(GTreeNode parentNode, GTreeNode newNode)`
  `void`
  `fireNodeDataChanged(GTreeNode changedNode)`
  `void`
  `fireNodeRemoved(GTreeNode parentNode, GTreeNode removedNode, int index)`
  `void`
  `fireNodeStructureChanged(GTreeNode changedNode)`
  `Object`
  `getChild(Object parent, int index)`
  `int`
  `getChildCount(Object parent)`
  `int`
  `getIndexOfChild(Object parent, Object child)`
  `GTreeNode`
  `getModelRoot()`
  `Object`
  `getRoot()`
  `boolean`
  `isLeaf(Object node)`
  `void`
  `privateSwingSetRootNode(GTreeNode newRoot)`
  Sets the models root node.
  `void`
  `removeTreeModelListener(TreeModelListener l)`
  `void`
  `setEventsEnabled(boolean b)`
  `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 Details

  - ### GTreeModel

    public GTreeModel(GTreeNode root)
    Constructs a GTreeModel with the given root node.
    Parameters:
      `root` - The root of the tree.

- ## Method Details

  - ### privateSwingSetRootNode

    public void privateSwingSetRootNode(GTreeNode newRoot)
    Sets the models root node. NOTE: this is intended to only be called from the `GTree`
    Parameters:
      `newRoot` - the new tree model root. It will either be the actual root or a root of a filtered sub-tree

  - ### getRoot

    public Object getRoot()
    Specified by:
      `getRoot` in interface `TreeModel`

  - ### getModelRoot

    public GTreeNode getModelRoot()

  - ### addTreeModelListener

    public void addTreeModelListener(TreeModelListener l)
    Specified by:
      `addTreeModelListener` in interface `TreeModel`

  - ### removeTreeModelListener

    public void removeTreeModelListener(TreeModelListener l)
    Specified by:
      `removeTreeModelListener` 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`

  - ### getIndexOfChild

    public int getIndexOfChild(Object parent, Object child)
    Specified by:
      `getIndexOfChild` 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`

  - ### fireNodeStructureChanged

    public void fireNodeStructureChanged(GTreeNode changedNode)

  - ### fireNodeDataChanged

    public void fireNodeDataChanged(GTreeNode changedNode)

  - ### fireNodeAdded

    public void fireNodeAdded(GTreeNode parentNode, GTreeNode newNode)

  - ### fireNodeRemoved

    public void fireNodeRemoved(GTreeNode parentNode, GTreeNode removedNode, int index)

  - ### dispose

    public void dispose()

  - ### setEventsEnabled

    public void setEventsEnabled(boolean b)