org.base.apps.core.swing
Class BaseAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.base.apps.core.swing.BaseAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, AppEventEmitter, BeanContainer<AppFrame>

public class BaseAction
extends AbstractAction
implements AppEventEmitter, BeanContainer<AppFrame>

Global actions in the BASE runtime environment.

Author:
Kevan Simpson
See Also:
Serialized Form

Nested Class Summary
static class BaseAction.Axn
           
 
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
protected BaseAction(BaseAction.Axn axn)
          Constructs a BaseAction for the given BaseAction.Axn.
protected BaseAction(String cmd, String text, String tooltip)
           
 
Method Summary
 void actionPerformed(ActionEvent evt)
           
 void addAppEventListener(AppEventListener lsnr)
           
 void addAppEventListener(String appName, AppEventListener lsnr)
           
protected  void exit()
           
 void fireAppEvent(AppEvent evt)
           
 AppEventListener[] getAppEventListeners()
           
 AppEventListener[] getAppEventListeners(String appName)
           
 AppFrame getBean()
          Returns this container's data bean, which may be null.
protected  AppEventSupport getEventSupport()
           
protected  void initIcons(ViewUtil.Img cmd, String tooltip)
           
protected  void launch()
           
protected static org.apache.commons.logging.Log log()
           
static ActionMap newBaseActions()
           
 void removeAppEventListener(AppEventListener lsnr)
           
 void removeAppEventListener(String appName, AppEventListener lsnr)
           
 void setBean(AppFrame bean)
          Sets this container's data bean.
 
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

BaseAction

protected BaseAction(BaseAction.Axn axn)
Constructs a BaseAction for the given BaseAction.Axn.

Parameters:
axn - The given action.

BaseAction

protected BaseAction(String cmd,
                     String text,
                     String tooltip)
Method Detail

newBaseActions

public static ActionMap newBaseActions()

initIcons

protected void initIcons(ViewUtil.Img cmd,
                         String tooltip)

actionPerformed

public void actionPerformed(ActionEvent evt)
Specified by:
actionPerformed in interface ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

addAppEventListener

public void addAppEventListener(AppEventListener lsnr)
Specified by:
addAppEventListener in interface AppEventEmitter
See Also:
AppEventSupport.addAppEventListener(org.base.apps.api.events.AppEventListener)

addAppEventListener

public void addAppEventListener(String appName,
                                AppEventListener lsnr)
Specified by:
addAppEventListener in interface AppEventEmitter
See Also:
AppEventSupport.addAppEventListener(java.lang.String, org.base.apps.api.events.AppEventListener)

fireAppEvent

public void fireAppEvent(AppEvent evt)
Specified by:
fireAppEvent in interface AppEventEmitter
See Also:
AppEventSupport.fireAppEvent(org.base.apps.api.events.AppEvent)

getAppEventListeners

public AppEventListener[] getAppEventListeners()
Specified by:
getAppEventListeners in interface AppEventEmitter
See Also:
AppEventSupport.getAppEventListeners()

getAppEventListeners

public AppEventListener[] getAppEventListeners(String appName)
Specified by:
getAppEventListeners in interface AppEventEmitter
See Also:
AppEventSupport.getAppEventListeners(java.lang.String)

removeAppEventListener

public void removeAppEventListener(AppEventListener lsnr)
Specified by:
removeAppEventListener in interface AppEventEmitter
See Also:
AppEventSupport.removeAppEventListener(org.base.apps.api.events.AppEventListener)

removeAppEventListener

public void removeAppEventListener(String appName,
                                   AppEventListener lsnr)
Specified by:
removeAppEventListener in interface AppEventEmitter
See Also:
AppEventSupport.removeAppEventListener(java.lang.String, org.base.apps.api.events.AppEventListener)

getBean

public AppFrame getBean()
Description copied from interface: BeanContainer
Returns this container's data bean, which may be null.

Specified by:
getBean in interface BeanContainer<AppFrame>
Returns:
this container's data bean or null.
See Also:
BeanContainer.getBean()

setBean

public void setBean(AppFrame bean)
Description copied from interface: BeanContainer
Sets this container's data bean.

Specified by:
setBean in interface BeanContainer<AppFrame>
Parameters:
bean - this container's data bean.
See Also:
BeanContainer.setBean(java.lang.Object)

exit

protected void exit()

launch

protected void launch()

getEventSupport

protected AppEventSupport getEventSupport()

log

protected static org.apache.commons.logging.Log log()

Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)