jade.gui
Class GuiEvent

java.lang.Object
  extended by jade.gui.GuiEvent

public class GuiEvent
extends java.lang.Object

This class defines the object type GuiEvent used 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 extends java.lang.Object; therefore primitive object (e.g.int) should be wrapped into appropriate objects(e.g java.lang.Integer).

Version:
$Date: 2003-11-20 11:55:37 +0100 (gio, 20 nov 2003) $ $Revision: 4572 $
Author:
Giovanni Caire - CSELT S.p.A.
See Also:
GuiAgent

Field Summary
protected  java.lang.Object source
           
protected  int type
           
 
Constructor Summary
GuiEvent(java.lang.Object eventSource, int eventType)
          Create a GUI event.
 
Method Summary
 void addParameter(java.lang.Object param)
          Add a new parameter to this event.
 Iterator getAllParameter()
          Get an Iterator over all the parameters.
 java.lang.Object getParameter(int number)
          Get the parameter in the given position.
 java.lang.Object getSource()
          Retrieve the logical source of this GUI event.
 int getType()
          Retrieve the kind of this GUI event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected java.lang.Object source

type

protected int type
Constructor Detail

GuiEvent

public GuiEvent(java.lang.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 java.lang.Object getSource()
Retrieve the logical source of this GUI event.

Returns:
The event source, or null if no source was set.

addParameter

public void addParameter(java.lang.Object param)
Add a new parameter to this event.

Parameters:
param - is the parameter

getParameter

public java.lang.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.