com.inline.feature.ui.tree
Class FeatureTreeModel

java.lang.Object
  |
  +--com.inline.feature.ui.tree.FeatureTreeModel

public class FeatureTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel, java.beans.PropertyChangeListener, FeatureSetListener


Field Summary
protected  com.sun.java.util.collections.ArrayList listenerList
           
 
Constructor Summary
FeatureTreeModel(Feature rootFeature, FeatureTreeSelectionModel selectionModel)
           
 
Method Summary
protected  void activateFeature(Feature feature)
           
 void addTreeModelListener(javax.swing.event.TreeModelListener l)
           
 void featureAdded(FeatureSet set, Feature feature)
           
 void featureCollapsed(Feature feature)
           
 void featureExpanded(Feature feature)
           
 void featureRemoved(FeatureSet set, Feature feature)
           
 void featureReplaced(FeatureSet set, Feature oldFeature, Feature newFeature)
           
protected  void fireTreeNodesChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeNodesInserted(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeNodesRemoved(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeStructureChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
 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)
          Returns the index of child in parent.
 java.lang.Object getRoot()
           
protected  boolean isFeatureExpanded(Feature feature)
           
 boolean isLeaf(java.lang.Object node)
           
protected  void passivateFeature(Feature feature)
           
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener l)
           
 void reparse()
           
 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
 

Field Detail

listenerList

protected com.sun.java.util.collections.ArrayList listenerList
Constructor Detail

FeatureTreeModel

public FeatureTreeModel(Feature rootFeature,
                        FeatureTreeSelectionModel selectionModel)
Method Detail

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

isFeatureExpanded

protected boolean isFeatureExpanded(Feature feature)

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Returns the index of child in parent.
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

featureExpanded

public void featureExpanded(Feature feature)

featureCollapsed

public void featureCollapsed(Feature feature)

activateFeature

protected void activateFeature(Feature feature)

passivateFeature

protected void passivateFeature(Feature feature)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

featureAdded

public void featureAdded(FeatureSet set,
                         Feature feature)
Specified by:
featureAdded in interface FeatureSetListener

featureRemoved

public void featureRemoved(FeatureSet set,
                           Feature feature)
Specified by:
featureRemoved in interface FeatureSetListener

featureReplaced

public void featureReplaced(FeatureSet set,
                            Feature oldFeature,
                            Feature newFeature)
Specified by:
featureReplaced in interface FeatureSetListener

reparse

public void reparse()

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener l)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel

fireTreeNodesChanged

protected void fireTreeNodesChanged(java.lang.Object source,
                                    java.lang.Object[] path,
                                    int[] childIndices,
                                    java.lang.Object[] children)

fireTreeNodesInserted

protected void fireTreeNodesInserted(java.lang.Object source,
                                     java.lang.Object[] path,
                                     int[] childIndices,
                                     java.lang.Object[] children)

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(java.lang.Object source,
                                    java.lang.Object[] path,
                                    int[] childIndices,
                                    java.lang.Object[] children)

fireTreeStructureChanged

protected void fireTreeStructureChanged(java.lang.Object source,
                                        java.lang.Object[] path,
                                        int[] childIndices,
                                        java.lang.Object[] children)