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

## net.sourceforge.pmd.util.viewer.model
Class ASTModel

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

All Implemented Interfaces:
  javax.swing.tree.TreeModel

public class ASTModel
extends java.lang.Object
implements javax.swing.tree.TreeModel

Model for the AST Panel Tree component

Version:
  $Id: ASTModel.java,v 1.9 2006/02/10 14:26:32 tomcopeland Exp $
Author:
  Boris Gruschko ( boris at gruschko.org )

Constructor Summary
`ASTModel(SimpleNode root)` creates the tree model

Method Summary
`void` | `addTreeModelListener(javax.swing.event.TreeModelListener l)`
`protected void` | `fireTreeModelEvent(javax.swing.event.TreeModelEvent e)`
`java.lang.Object` | `getChild(java.lang.Object parent, int index)`
`int` | `getChildCount(java.lang.Object parent)`
`int` | `getIndexOfChild(java.lang.Object parent, java.lang.Object child)`
`java.lang.Object` | `getRoot()`
`boolean` | `isLeaf(java.lang.Object node)`
`void` | `removeTreeModelListener(javax.swing.event.TreeModelListener l)`
`void` | `valueForPathChanged(javax.swing.tree.TreePath path, java.lang.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(SimpleNode root)

  creates the tree model

Parameters:
  `root` - tree's root

Method Detail

### getChild

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

  Specified by:
    `getChild` in interface `javax.swing.tree.TreeModel`
  See Also:
    `TreeModel`

### getChildCount

    public int getChildCount(java.lang.Object parent)

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

### getIndexOfChild

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

  Specified by:
    `getIndexOfChild` in interface `javax.swing.tree.TreeModel`
  See Also:
    `javax.swing.tree.TreeModel#getIndexOfChild(java.lang.Object,

    java.lang.Object)`

### isLeaf

    public boolean isLeaf(java.lang.Object node)

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

### getRoot

    public java.lang.Object getRoot()

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

### valueForPathChanged

    public void valueForPathChanged(javax.swing.tree.TreePath path,
                                    java.lang.Object newValue)

  Specified by:
    `valueForPathChanged` in interface `javax.swing.tree.TreeModel`
  See Also:
    `javax.swing.tree.TreeModel#valueForPathChanged(javax.swing.tree.TreePath,

    java.lang.Object)`

### addTreeModelListener

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

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

### removeTreeModelListener

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

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

### fireTreeModelEvent

    protected void fireTreeModelEvent(javax.swing.event.TreeModelEvent e)

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

Copyright © 2002-2006 InfoEther. All Rights Reserved.