Class FormEvent
- java.lang.Object
-
- java.util.EventObject
-
- net.sf.jguiraffe.gui.builder.event.BuilderEvent
-
- net.sf.jguiraffe.gui.builder.event.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 associatedComponentHandler
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
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description FormEvent(Object source, ComponentHandler<?> handler, String name)
Creates a new instance ofFormEvent
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.ComponentHandler<?>
getHandler()
Returns the handler object of the component, which caused this event.String
getName()
Returns the name of the component, which caused this event.int
hashCode()
Returns a hash code for this object.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
FormEvent
public FormEvent(Object source, ComponentHandler<?> handler, String name)
Creates a new instance ofFormEvent
and initializes it.- Parameters:
source
- the event source; this should be the platform specific event object that is wrapped by this generic object instancehandler
- the component handlername
- 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.
-
-