net.sourceforge.pmd.util.viewer.model

## Class ASTModel

- java.lang.Object
- - net.sourceforge.pmd.util.viewer.model.ASTModel

- All Implemented Interfaces:
    TreeModel

      public class ASTModel
      extends Object
      implements TreeModel

  Model for the AST Panel Tree component
  Version:
    $Id$
  Author:
    Boris Gruschko ( boris at gruschko.org )

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ASTModel(Node root)` creates the tree model

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTreeModelListener(TreeModelListener l)`
    `protected void` | `fireTreeModelEvent(TreeModelEvent e)`
    `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)`
    `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

    - #### ASTModel

          public ASTModel(Node root)

      creates the tree model
      Parameters:
        `root` - tree's root

  - ### Method Detail

    - #### getChild

          public Object getChild(Object parent,
                        int index)

      Specified by:
        `getChild` in interface `TreeModel`
      See Also:
        `TreeModel`

    - #### getChildCount

          public int getChildCount(Object parent)

      Specified by:
        `getChildCount` in interface `TreeModel`
      See Also:
        `TreeModel.getChildCount(java.lang.Object)`

    - #### getIndexOfChild

          public int getIndexOfChild(Object parent,
                            Object child)

      Specified by:
        `getIndexOfChild` in interface `TreeModel`
      See Also:
        `TreeModel.getIndexOfChild(java.lang.Object,java.lang.Object)`

    - #### isLeaf

          public boolean isLeaf(Object node)

      Specified by:
        `isLeaf` in interface `TreeModel`
      See Also:
        `TreeModel.isLeaf(java.lang.Object)`

    - #### getRoot

          public Object getRoot()

      Specified by:
        `getRoot` in interface `TreeModel`
      See Also:
        `TreeModel.getRoot()`

    - #### valueForPathChanged

          public void valueForPathChanged(TreePath path,
                                 Object newValue)

      Specified by:
        `valueForPathChanged` in interface `TreeModel`
      See Also:
        `TreeModel.valueForPathChanged(javax.swing.tree.TreePath,java.lang.Object)`

    - #### addTreeModelListener

          public void addTreeModelListener(TreeModelListener l)

      Specified by:
        `addTreeModelListener` in interface `TreeModel`
      See Also:
        `TreeModel.addTreeModelListener(javax.swing.event.TreeModelListener)`

    - #### removeTreeModelListener

          public void removeTreeModelListener(TreeModelListener l)

      Specified by:
        `removeTreeModelListener` in interface `TreeModel`
      See Also:
        `TreeModel.removeTreeModelListener(javax.swing.event.TreeModelListener)`

    - #### fireTreeModelEvent

          protected void fireTreeModelEvent(TreeModelEvent e)

Copyright © 2002-2013 InfoEther. All Rights Reserved.