org.keridwen.core.messaging
Class ViewEvent<ResultType,MessageType>

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.keridwen.core.messaging.ViewEvent<ResultType,MessageType>
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, Event<ResultType,MessageType>

public class ViewEvent<ResultType,MessageType>
extends AbstractAction
implements Event<ResultType,MessageType>, Action

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ViewEvent(EventKey anEventKey, MessageType aMessage)
           
ViewEvent(EventKey anEventKey, MessageType aMessage, String name, Icon icon, String tooltip)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 BundleController getDestination()
          Gets the BundleController to which this Event should be sent (if known).
 Event<ResultType,MessageType> getEvent()
           
 EventKey getKey()
          Returns the unique EventKey of this Event.
 MessageType getMessage()
          Gets the message transmitted with by the Event.
 Object getSource()
          Gets the sender of the Event.
 Supervisor<ResultType> getSupervisor()
          Gets the supervisor of the associated Command.
 void setMessage(MessageType aMessage)
          Sets the message of the Event.
 void setSupervisor(Supervisor<ResultType> aSupervisor)
          Sets the supervisor of the associated Command.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

ViewEvent

public ViewEvent(EventKey anEventKey,
                 MessageType aMessage)

ViewEvent

public ViewEvent(EventKey anEventKey,
                 MessageType aMessage,
                 String name,
                 Icon icon,
                 String tooltip)
Method Detail

getEvent

public Event<ResultType,MessageType> getEvent()

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getKey

public final EventKey getKey()
Description copied from interface: Event
Returns the unique EventKey of this Event.

Specified by:
getKey in interface Event<ResultType,MessageType>
Returns:
the unique Id of the Event

getMessage

public final MessageType getMessage()
Description copied from interface: Event
Gets the message transmitted with by the Event.

Specified by:
getMessage in interface Event<ResultType,MessageType>
Returns:
the message of the Event

setMessage

public final void setMessage(MessageType aMessage)
Description copied from interface: Event
Sets the message of the Event.

Specified by:
setMessage in interface Event<ResultType,MessageType>
Parameters:
aMessage - the message to set.

getDestination

public final BundleController getDestination()
Description copied from interface: Event
Gets the BundleController to which this Event should be sent (if known).

Specified by:
getDestination in interface Event<ResultType,MessageType>
Returns:
the BundleController that should process this Event.

getSource

public final Object getSource()
Description copied from interface: Event
Gets the sender of the Event.

Specified by:
getSource in interface Event<ResultType,MessageType>
Returns:
the object sending the Event.

getSupervisor

public final Supervisor<ResultType> getSupervisor()
Description copied from interface: Event
Gets the supervisor of the associated Command.

Specified by:
getSupervisor in interface Event<ResultType,MessageType>
Returns:
the event supervisor.

setSupervisor

public final void setSupervisor(Supervisor<ResultType> aSupervisor)
Description copied from interface: Event
Sets the supervisor of the associated Command.

Specified by:
setSupervisor in interface Event<ResultType,MessageType>
Parameters:
aSupervisor - the command supervisor


Copyright © 2010-2013 Artenum. All Rights Reserved.