Class 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
    • Constructor Detail

      • TreeExpansionEvent

        public TreeExpansionEvent​(Object source,
                                  TreeHandler handler,
                                  String name,
                                  TreeExpansionEvent.Type type,
                                  TreeNodePath path)
        Creates a new instance of TreeExpansionEvent and initializes it.
        Parameters:
        source - the source of this event
        handler - the component handler affected (this is a handler for a tree component)
        name - the name of the component
        type - the type of this event
        path - 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
      • hashCode

        public int hashCode()
        Returns a hash code for this object. This implementation takes the additional fields into account declared by this class.
        Overrides:
        hashCode in class FormEvent
        Returns:
        a hash code
        Since:
        1.3
      • 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.
        Overrides:
        equals in class FormEvent
        Since:
        1.3