SRJRCFrames
v0.1.296

de.schwarzrot.ui.action
Class ApplicationCommand

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by de.schwarzrot.ui.action.ApplicationCommand
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class ApplicationCommand
extends AbstractAction

action base class for applications. ApplicationCommand extends AbstractAction with localized lookup of text- and image- resources. It also implements the famous actionPerformed, so the use of this class will reduce the anonymous classes a lot. ApplicationCommand uses ActionCallbacks to bind to application methods.

Author:
Reinhard Mantey
See Also:
Serialized Form

Field Summary
static String ACCESS_GRANTED_KEY
           
static String ACCESS_MODE_KEY
           
static String APPLICATION_CALLBACK_KEY
           
static String APPLICATION_EVENT_PUBLISHER_KEY
           
static String APPLICATION_ID_KEY
           
 
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
ApplicationCommand(String actionID, Application<?> app, AbstractActionCallback cb)
           
ApplicationCommand(String actionID, String appID, AbstractActionCallback cb)
           
ApplicationCommand(String actionID, String appID, AbstractActionCallback cb, int mnemonic, AccessMode mode)
           
 
Method Summary
 void actionPerformed(ActionEvent ae)
           
 AccessMode getAccessMode()
           
protected  AbstractActionCallback getActionCallback()
           
 String getActionId()
           
 String getApplicationID()
           
 Boolean isPermitted()
           
protected  void setAccessMode(AccessMode accessMode)
           
protected  void setActionCallback(AbstractActionCallback cb)
           
protected  void setApplicationID(String appID)
           
protected  void setPermitted(boolean permitted)
           
 
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
 

Field Detail

ACCESS_GRANTED_KEY

public static final String ACCESS_GRANTED_KEY
See Also:
Constant Field Values

ACCESS_MODE_KEY

public static final String ACCESS_MODE_KEY
See Also:
Constant Field Values

APPLICATION_EVENT_PUBLISHER_KEY

public static final String APPLICATION_EVENT_PUBLISHER_KEY
See Also:
Constant Field Values

APPLICATION_ID_KEY

public static final String APPLICATION_ID_KEY
See Also:
Constant Field Values

APPLICATION_CALLBACK_KEY

public static final String APPLICATION_CALLBACK_KEY
See Also:
Constant Field Values
Constructor Detail

ApplicationCommand

public ApplicationCommand(String actionID,
                          Application<?> app,
                          AbstractActionCallback cb)

ApplicationCommand

public ApplicationCommand(String actionID,
                          String appID,
                          AbstractActionCallback cb)

ApplicationCommand

public ApplicationCommand(String actionID,
                          String appID,
                          AbstractActionCallback cb,
                          int mnemonic,
                          AccessMode mode)
Method Detail

actionPerformed

public final void actionPerformed(ActionEvent ae)

getAccessMode

public AccessMode getAccessMode()

getActionId

public String getActionId()

getApplicationID

public String getApplicationID()

isPermitted

public Boolean isPermitted()

getActionCallback

protected AbstractActionCallback getActionCallback()

setAccessMode

protected void setAccessMode(AccessMode accessMode)

setActionCallback

protected void setActionCallback(AbstractActionCallback cb)

setApplicationID

protected void setApplicationID(String appID)

setPermitted

protected void setPermitted(boolean permitted)

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.