Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.jdevimpl.audit.swing
Class AbstractTreeModel

java.lang.Object
  extended by oracle.jdevimpl.audit.swing.AbstractTreeModel

All Implemented Interfaces:
javax.swing.tree.TreeModel
Direct Known Subclasses:
ProfileTreeModel

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

An abstract tree model.


Field Summary
protected  javax.swing.event.EventListenerList listenerList
           

 

Constructor Summary
AbstractTreeModel()
           

 

Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener l)
          Adds a listener for the TreeModelEvent posted after the tree changes.
 void fireTreeNodesChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
          Notifies all listeners that have registered interest for notification on this event type.
 void fireTreeNodesInserted(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
          Notifies all listeners that have registered interest for notification on this event type.
 void fireTreeNodesRemoved(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
          Notifies all listeners that have registered interest for notification on this event type.
 void fireTreeStructureChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
          Notifies all listeners that have registered interest for notification on this event type.
 void fireTreeStructureChanged(java.lang.Object source, javax.swing.tree.TreePath path)
           
 java.util.EventListener[] getListeners(java.lang.Class listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this model.
 javax.swing.event.TreeModelListener[] getTreeModelListeners()
          Returns an array of all the tree model listeners registered on this model.
 void removeTreeModelListener(javax.swing.event.TreeModelListener l)
          Removes a listener previously added with addTreeModelListener().

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface javax.swing.tree.TreeModel
getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, valueForPathChanged

 

Field Detail

listenerList

protected javax.swing.event.EventListenerList listenerList

Constructor Detail

AbstractTreeModel

public AbstractTreeModel()

Method Detail

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel
Parameters:
l - the listener to add
See Also:
removeTreeModelListener(javax.swing.event.TreeModelListener)

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes a listener previously added with addTreeModelListener().
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel
Parameters:
l - the listener to remove
See Also:
addTreeModelListener(javax.swing.event.TreeModelListener)

getTreeModelListeners

public javax.swing.event.TreeModelListener[] getTreeModelListeners()
Returns an array of all the tree model listeners registered on this model.
Returns:
all of this model's TreeModelListeners or an empty array if no tree model listeners are currently registered
Since:
1.4
See Also:
addTreeModelListener(javax.swing.event.TreeModelListener), removeTreeModelListener(javax.swing.event.TreeModelListener)

fireTreeNodesChanged

public void fireTreeNodesChanged(java.lang.Object source,
                                 java.lang.Object[] path,
                                 int[] childIndices,
                                 java.lang.Object[] children)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
source - the node being changed
path - the path to the root node
childIndices - the indices of the changed elements
children - the changed elements
See Also:
EventListenerList

fireTreeNodesInserted

public void fireTreeNodesInserted(java.lang.Object source,
                                  java.lang.Object[] path,
                                  int[] childIndices,
                                  java.lang.Object[] children)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
source - the node where new elements are being inserted
path - the path to the root node
childIndices - the indices of the new elements
children - the new elements
See Also:
EventListenerList

fireTreeNodesRemoved

public void fireTreeNodesRemoved(java.lang.Object source,
                                 java.lang.Object[] path,
                                 int[] childIndices,
                                 java.lang.Object[] children)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
source - the node where elements are being removed
path - the path to the root node
childIndices - the indices of the removed elements
children - the removed elements
See Also:
EventListenerList

fireTreeStructureChanged

public void fireTreeStructureChanged(java.lang.Object source,
                                     java.lang.Object[] path,
                                     int[] childIndices,
                                     java.lang.Object[] children)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
Parameters:
source - the node where the tree model has changed
path - the path to the root node
childIndices - the indices of the affected elements
children - the affected elements
See Also:
EventListenerList

fireTreeStructureChanged

public void fireTreeStructureChanged(java.lang.Object source,
                                     javax.swing.tree.TreePath path)

getListeners

public java.util.EventListener[] getListeners(java.lang.Class listenerType)
Returns an array of all the objects currently registered as FooListeners upon this model. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a DefaultTreeModel m for its tree model listeners with the following code:

TreeModelListener[] tmls = (TreeModelListener[])(m.getListeners(TreeModelListener.class));
If no such listeners exist, this method returns an empty array.
Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this component, or an empty array if no such listeners have been added
Throws:
java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
Since:
1.3
See Also:
getTreeModelListeners()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


Copyright © 1997, 2013, Oracle. All rights reserved.