org.bushe.swing.event
Class EventBusAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.bushe.swing.event.EventServiceAction
          extended by org.bushe.swing.event.EventBusAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class EventBusAction
extends EventServiceAction

When fired, this action publishes events on the EventBus.

See Also:
EventServiceAction, Serialized Form

Field Summary
 
Fields inherited from class org.bushe.swing.event.EventServiceAction
EVENT_BUS_EVENT_CLASS_NAME, EVENT_SERVICE_TOPIC_NAME
 
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
EventBusAction()
           
EventBusAction(String actionName, ImageIcon icon)
           
 
Method Summary
protected  EventService getEventService(ActionEvent event)
          Override to return the EventService on which to publish.
 
Methods inherited from class org.bushe.swing.event.EventServiceAction
actionPerformed, getEventServiceEvent, getName, getThrowsExceptionOnNullEventService, getTopicName, getTopicValue, isPublishesOnTopic, setPublishesOnTopic, setThrowsExceptionOnNullEventService, setTopicName
 
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
 

Constructor Detail

EventBusAction

public EventBusAction()

EventBusAction

public EventBusAction(String actionName,
                      ImageIcon icon)
Method Detail

getEventService

protected EventService getEventService(ActionEvent event)
Description copied from class: EventServiceAction
Override to return the EventService on which to publish.

Specified by:
getEventService in class EventServiceAction
Parameters:
event - the event passed to #execute(ActionEvent)
Returns:
the event service to publish on, if null and getThrowsExceptionOnNullEventService() is true (default) an exception is thrown
See Also:
EventBusAction, ContainerEventServiceAction


Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.