Class FormEvent

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    FormActionEvent, FormChangeEvent, FormFocusEvent, FormMouseEvent, TreeExpansionEvent

    public class FormEvent
    extends BuilderEvent

    An event class used in the form and form builder framework to deliver event information related to form elements (controls or input components).

    All input components in a Form object (i.e. form elements with an associated ComponentHandler can act as event sources. Therefore all event objects contain a reference to the component handler of the event source and the name under which the corresponding component was registered at the form. These properties can be used by custom event listener implementations to find out, which component has caused the event and to access the component's current input data.

    Version:
    $Id: FormEvent.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    See Also:
    Serialized Form
    • Constructor Detail

      • FormEvent

        public FormEvent​(Object source,
                         ComponentHandler<?> handler,
                         String name)
        Creates a new instance of FormEvent and initializes it.
        Parameters:
        source - the event source; this should be the platform specific event object that is wrapped by this generic object instance
        handler - the component handler
        name - the component's name
    • Method Detail

      • getHandler

        public ComponentHandler<?> getHandler()
        Returns the handler object of the component, which caused this event.
        Returns:
        the component handler
      • getName

        public String getName()
        Returns the name of the component, which caused this event.
        Returns:
        the component's name
      • hashCode

        public int hashCode()
        Returns a hash code for this object.
        Overrides:
        hashCode in class Object
        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.
        Overrides:
        equals in class Object
        Since:
        1.3