Package jade.gui
Class GuiEvent
- java.lang.Object
-
- jade.gui.GuiEvent
-
public class GuiEvent extends Object
This class defines the object typeGuiEventused to notify an event to a GuiAgent. It has two mandatory attributes:the source of the event and an integer identifying the type of event and an optional list of parameters than can be added to the event object.The type of each parameter must extendsjava.lang.Object; therefore primitive object (e.g.int) should be wrapped into appropriate objects(e.gjava.lang.Integer).- Version:
- $Date$ $Revision$
- Author:
- Giovanni Caire - CSELT S.p.A.
- See Also:
GuiAgent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(Object param)Add a new parameter to this event.IteratorgetAllParameter()Get an Iterator over all the parameters.ObjectgetParameter(int number)Get the parameter in the given position.ObjectgetSource()Retrieve the logical source of this GUI event.intgetType()Retrieve the kind of this GUI event.
-
-
-
Field Detail
-
source
protected Object source
-
type
protected int type
-
-
Constructor Detail
-
GuiEvent
public GuiEvent(Object eventSource, int eventType)
Create a GUI event.- Parameters:
eventSource- The logical source of this event.eventType- An integer value, identifying the kind of this event.
-
-
Method Detail
-
getType
public int getType()
Retrieve the kind of this GUI event.- Returns:
- The kind of this event.
-
getSource
public Object getSource()
Retrieve the logical source of this GUI event.- Returns:
- The event source, or
nullif no source was set.
-
addParameter
public void addParameter(Object param)
Add a new parameter to this event.- Parameters:
param- is the parameter
-
getParameter
public Object getParameter(int number)
Get the parameter in the given position.- Returns:
- the Object with the parameter.
-
getAllParameter
public Iterator getAllParameter()
Get an Iterator over all the parameters.- Returns:
- An iterator, scanning the event parameter list.
-
-