org.springframework.richclient.command
Class ActionCommand

java.lang.Object
  extended by org.springframework.binding.value.support.AbstractPropertyChangePublisher
      extended by org.springframework.richclient.command.AbstractCommand
          extended by org.springframework.richclient.command.ActionCommand
All Implemented Interfaces:
BeanNameAware, InitializingBean, PropertyChangePublisher, ActionCommandExecutor, GuardedActionCommandExecutor, ParameterizableActionCommandExecutor, Authorizable, Guarded, SecurityControllable
Direct Known Subclasses:
AdjustFontSizeCommand, ApplicationWindowAwareCommand, CascadeCommand, DialogCommand, HibernateExceptionHandlerCommand, JXErrorDialogExceptionHandlerCommand, MessagesDialogExceptionHandlerCommand, MinimizeAllCommand, PreferenceCommand, ShowFrameCommand, SortTableCommand, TargetableActionCommand, TileCommand, ToggleCommand

public abstract class ActionCommand
extends AbstractCommand
implements ActionCommandExecutor, ParameterizableActionCommandExecutor


Field Summary
static String ACTION_COMMAND_PARAMETER_KEY
           
static String ACTION_COMMAND_PROPERTY
           
static String ACTION_EVENT_PARAMETER_KEY
           
static String MODIFIERS_PARAMETER_KEY
           
 
Fields inherited from class org.springframework.richclient.command.AbstractCommand
ENABLED_PROPERTY_NAME, VISIBLE_PROPERTY_NAME
 
Fields inherited from class org.springframework.binding.value.support.AbstractPropertyChangePublisher
logger
 
Fields inherited from interface org.springframework.richclient.core.Authorizable
AUTHORIZED_PROPERTY
 
Constructor Summary
ActionCommand()
           
ActionCommand(String commandId)
           
ActionCommand(String id, CommandFaceDescriptor face)
           
ActionCommand(String id, String encodedLabel)
           
ActionCommand(String id, String encodedLabel, Icon icon, String caption)
           
 
Method Summary
 void addCommandInterceptor(ActionCommandInterceptor l)
           
 void addParameter(Object key, Object value)
           
protected abstract  void doExecuteCommand()
           
 void execute()
          Performs the action.
 void execute(Map parameters)
          Invoke the specified command, passing in the set of arbitrary execution parameters.
 Action getActionAdapter()
           
 String getActionCommand()
           
protected  int getModifiers()
           
protected  Object getParameter(Object key)
           
protected  Object getParameter(Object key, Object defaultValue)
           
protected  Map getParameters()
           
 boolean isDisplaysInputDialog()
           
protected  void onButtonAttached(AbstractButton button)
          Additional code to execute when attaching a button.
protected  void onPostExecute()
           
protected  boolean onPreExecute()
           
 void removeCommandInterceptor(ActionCommandInterceptor l)
           
 void setActionCommand(String newCommandName)
           
 void setDefaultButton()
           
 void setDefaultButtonIn(RootPaneContainer container)
           
 void setDisplaysInputDialog(boolean displaysInputDialog)
           
 
Methods inherited from class org.springframework.richclient.command.AbstractCommand
addEnabledListener, afterPropertiesSet, attach, attach, attach, buttonIterator, createButton, createButton, createButton, createButton, createButton, createButton, createMenuItem, createMenuItem, createMenuItem, createMenuItem, createMenuItem, createMenuItem, defaultButtonIterator, detach, getAccelerator, getButtonFactory, getButtonIn, getCommandServices, getComponentFactory, getDefaultButtonConfigurer, getDefaultFaceDescriptorId, getFaceDescriptor, getFaceDescriptorRegistry, getIcon, getId, getMenuFactory, getMenuItemButtonConfigurer, getMnemonic, getMnemonicIndex, getSecurityControllerId, getText, getToolBarButtonConfigurer, getToolBarButtonFactory, isAnonymous, isAttached, isAuthorized, isEnabled, isFaceConfigured, isVisible, onButtonDetached, removeEnabledListener, requestFocusIn, setAuthorized, setBeanName, setCaption, setCommandServices, setDefaultFaceDescriptorId, setEnabled, setFaceDescriptor, setFaceDescriptor, setFaceDescriptorRegistry, setFaceDescriptors, setIcon, setIconInfo, setId, setLabel, setLabel, setSecurityControllerId, setVisible, toString, updatedEnabledState, updatedVisibleState
 
Methods inherited from class org.springframework.binding.value.support.AbstractPropertyChangePublisher
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, firePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasChanged, hasChanged, hasChanged, hasChanged, hasChanged, hasChanged, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION_COMMAND_PROPERTY

public static final String ACTION_COMMAND_PROPERTY
See Also:
Constant Field Values

ACTION_COMMAND_PARAMETER_KEY

public static final String ACTION_COMMAND_PARAMETER_KEY
See Also:
Constant Field Values

ACTION_EVENT_PARAMETER_KEY

public static final String ACTION_EVENT_PARAMETER_KEY
See Also:
Constant Field Values

MODIFIERS_PARAMETER_KEY

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

ActionCommand

public ActionCommand()

ActionCommand

public ActionCommand(String commandId)

ActionCommand

public ActionCommand(String id,
                     CommandFaceDescriptor face)

ActionCommand

public ActionCommand(String id,
                     String encodedLabel)

ActionCommand

public ActionCommand(String id,
                     String encodedLabel,
                     Icon icon,
                     String caption)
Method Detail

addParameter

public void addParameter(Object key,
                         Object value)

getParameter

protected Object getParameter(Object key)

getParameters

protected Map getParameters()

getParameter

protected Object getParameter(Object key,
                              Object defaultValue)

addCommandInterceptor

public void addCommandInterceptor(ActionCommandInterceptor l)

removeCommandInterceptor

public void removeCommandInterceptor(ActionCommandInterceptor l)

onButtonAttached

protected void onButtonAttached(AbstractButton button)
Description copied from class: AbstractCommand
Additional code to execute when attaching a button.

Overrides:
onButtonAttached in class AbstractCommand
Parameters:
button - the button that has been attached.

getModifiers

protected int getModifiers()

getActionAdapter

public Action getActionAdapter()

getActionCommand

public String getActionCommand()

setActionCommand

public void setActionCommand(String newCommandName)

setDefaultButtonIn

public void setDefaultButtonIn(RootPaneContainer container)

setDefaultButton

public void setDefaultButton()

setDisplaysInputDialog

public void setDisplaysInputDialog(boolean displaysInputDialog)

isDisplaysInputDialog

public boolean isDisplaysInputDialog()

execute

public final void execute(Map parameters)
Description copied from interface: ParameterizableActionCommandExecutor
Invoke the specified command, passing in the set of arbitrary execution parameters.

Specified by:
execute in interface ParameterizableActionCommandExecutor
Parameters:
parameters - the parameter map, consisting of name-value pairs.

execute

public final void execute()
Description copied from interface: ActionCommandExecutor
Performs the action.

Specified by:
execute in interface ActionCommandExecutor

onPreExecute

protected final boolean onPreExecute()

doExecuteCommand

protected abstract void doExecuteCommand()

onPostExecute

protected final void onPostExecute()


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.