javax.swing.event
Class TreeExpansionEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by javax.swing.event.TreeExpansionEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class TreeExpansionEvent
extends EventObject sample code for java.util.EventObject definition code for java.util.EventObject

An event used to identify a single path in a tree. The source returned by getSource will be an instance of JTree.

For further documentation and examples see the following sections in The Java Tutorial: How to Write a Tree Expansion Listener and How to Write a Tree-Will-Expand Listener.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Field Summary
protected  TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath path sample code for javax.swing.event.TreeExpansionEvent.path definition code for javax.swing.event.TreeExpansionEvent.path
          Path to the value this event represents.
 
Fields inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
TreeExpansionEvent sample code for javax.swing.event.TreeExpansionEvent.TreeExpansionEvent(java.lang.Object, javax.swing.tree.TreePath) definition code for javax.swing.event.TreeExpansionEvent.TreeExpansionEvent(java.lang.Object, javax.swing.tree.TreePath) (Object sample code for java.lang.Object definition code for java.lang.Object  source, TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  path)
          Constructs a TreeExpansionEvent object.
 
Method Summary
 TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath getPath sample code for javax.swing.event.TreeExpansionEvent.getPath() definition code for javax.swing.event.TreeExpansionEvent.getPath() ()
          Returns the path to the value that has been expanded/collapsed.
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource() , toString sample code for java.util.EventObject.toString() definition code for java.util.EventObject.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

path sample code for javax.swing.event.TreeExpansionEvent.path

protected TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  path
Path to the value this event represents.

Constructor Detail

TreeExpansionEvent sample code for javax.swing.event.TreeExpansionEvent(java.lang.Object, javax.swing.tree.TreePath) definition code for javax.swing.event.TreeExpansionEvent(java.lang.Object, javax.swing.tree.TreePath)

public TreeExpansionEvent(Object sample code for java.lang.Object definition code for java.lang.Object  source,
                          TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  path)
Constructs a TreeExpansionEvent object.

Parameters:
source - the Object that originated the event (typically this)
path - a TreePath object identifying the newly expanded node
Method Detail

getPath sample code for javax.swing.event.TreeExpansionEvent.getPath() definition code for javax.swing.event.TreeExpansionEvent.getPath()

public TreePath sample code for javax.swing.tree.TreePath definition code for javax.swing.tree.TreePath  getPath()
Returns the path to the value that has been expanded/collapsed.