Class TreeExpansionEvent
- java.lang.Object
-
- java.util.EventObject
-
- net.sf.jguiraffe.gui.builder.event.BuilderEvent
-
- net.sf.jguiraffe.gui.builder.event.FormEvent
-
- net.sf.jguiraffe.gui.builder.components.model.TreeExpansionEvent
-
- All Implemented Interfaces:
Serializable
public class TreeExpansionEvent extends FormEvent
An event class reporting a change in the expanded state of a tree's node.
Tree components support event listeners that are notified when a node of the tree is expanded or collapsed. These listeners are passed an event object of this type containing all data available.
- Version:
- $Id: TreeExpansionEvent.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TreeExpansionEvent.Type
An enumeration class defining the different types of aTreeExpansionEvent
.
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description TreeExpansionEvent(Object source, TreeHandler handler, String name, TreeExpansionEvent.Type type, TreeNodePath path)
Creates a new instance ofTreeExpansionEvent
and initializes it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
This base implementation tests the handler and name properties.TreeNodePath
getPath()
Returns the path to the node whose state has changed.TreeHandler
getTreeHandler()
Returns the handler for the tree component that is the source of this event.TreeExpansionEvent.Type
getType()
Returns the type of this event.int
hashCode()
Returns a hash code for this object.-
Methods inherited from class net.sf.jguiraffe.gui.builder.event.FormEvent
getHandler, getName
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
TreeExpansionEvent
public TreeExpansionEvent(Object source, TreeHandler handler, String name, TreeExpansionEvent.Type type, TreeNodePath path)
Creates a new instance ofTreeExpansionEvent
and initializes it.- Parameters:
source
- the source of this eventhandler
- the component handler affected (this is a handler for a tree component)name
- the name of the componenttype
- the type of this eventpath
- the path to the node whose state has changed
-
-
Method Detail
-
getPath
public TreeNodePath getPath()
Returns the path to the node whose state has changed. This is the node that triggered this event.- Returns:
- the path of the node affected
-
getTreeHandler
public TreeHandler getTreeHandler()
Returns the handler for the tree component that is the source of this event.- Returns:
- the handler for the tree component
-
getType
public TreeExpansionEvent.Type getType()
Returns the type of this event.- Returns:
- the event type
-
hashCode
public int hashCode()
Returns a hash code for this object. This implementation takes the additional fields into account declared by this class.
-
equals
public boolean equals(Object obj)
This base implementation tests the handler and name properties. It is implemented in a way that subclasses can override it to add checks for additional properties. This implementation also checks the additional fields declared by this class.
-
-