com.miginfocom.ashape.interaction
Class InteractionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.miginfocom.ashape.interaction.InteractionEvent
All Implemented Interfaces:
java.io.Serializable

public class InteractionEvent
extends java.util.EventObject

An event that gets fired when an interaction occurs.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
InteractionEvent(Interactor interactor, InteractionBroker broker, DefaultCommand cmd, java.awt.event.InputEvent sourceEvent)
          Constructor
 
Method Summary
 void consume()
          Marks the event as consumed.
 InteractionBroker getBroker()
          Returns the executor, or interpreter, of the command.
 DefaultCommand getCommand()
          Returns the command.
 Interactor getInteractor()
          Returns the interactor of the command.
 java.awt.event.InputEvent getSourceEvent()
          Returns the event that started the event or null if not applicable.
 boolean isConsumed()
          Returns if this event is considered to be consumed.
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InteractionEvent

public InteractionEvent(Interactor interactor,
                        InteractionBroker broker,
                        DefaultCommand cmd,
                        java.awt.event.InputEvent sourceEvent)
Constructor

Parameters:
interactor - The source if the interaction. If not originater from an Interactor it can be set to null.
broker - The executor, or interpreter, of the command.
cmd - The command. Should never be null.
sourceEvent - The event that started the event or null if not applicable.
Method Detail

consume

public void consume()
Marks the event as consumed. The meaning of this is for the implementation of the dispatched to decide.


isConsumed

public boolean isConsumed()
Returns if this event is considered to be consumed.

Returns:
If this event is considered to be consumed.

getInteractor

public Interactor getInteractor()
Returns the interactor of the command. This is same as (Interactor) getSource().

Returns:
The interactor of the command.

getBroker

public InteractionBroker getBroker()
Returns the executor, or interpreter, of the command.

Returns:
The executor, or interpreter, of the command.

getCommand

public DefaultCommand getCommand()
Returns the command. Should never be null.

Returns:
The command. Should never be null.

getSourceEvent

public java.awt.event.InputEvent getSourceEvent()
Returns the event that started the event or null if not applicable.

Returns:
The event that started the event or null if not applicable.

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.