Package jade.gui

Class GuiEvent


  • public class GuiEvent
    extends 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$ $Revision$
    Author:
    Giovanni Caire - CSELT S.p.A.
    See Also:
    GuiAgent
    • 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 null if 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.