com.sas.actionprovider
Class SwingAction

com.sas.actionprovider.SwingAction
All Implemented Interfaces:
ActionStatusKeysInterface, SupplementalPropertyKeysInterface, BaseEntityInterface, BaseEntityValueInterface, EntityKeyInterface, java.awt.event.ActionListener, java.lang.Cloneable, java.rmi.Remote, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
AddFolderAction, CopyAction, CutAction, DeleteAction, DetailsAction, FindAction, GoBackAction, ListAction, OpenFolderAction, PasteAction, RenameAction, StartSearchAction, TableViewAction, TreeAction, UpOneLevelAction, ViewMenuAction, ViewSelectionAction

public class SwingAction

The SwingAction class is the base class for all actions acquired from the SwingActionProvider.

A basic understanding of the ActionProvider Framework, of which this class is a part, is recommended before attempting to use this class.


Actions are objects that encapsulate everything needed to:


Typically, a Command object associated with the Action contains the logic for actually performing the operation.

When multiple Actions of the same actionType ( e.g. a DRILL_DOWN_ACTION in an OLAPTableView ) appear in different areas of a Component, they all share the same Command instance. This is possible because the APF can apply certain Action attributes to the command during the command execution phase. Often these attributes are specific area-dependent values such as a row and/or column index.

Action attributes that are applied to the command are COMMAND-type attributes that are designated as such via a property of the AttributeDescriptorInterface that is associated with the attribute.

There are 3 properties of the AttributeDescriptorInterface that are pertinent in the Swing version of APF:

  1. COMMAND: When true, these are Action attributes that the APF will apply to the command during the Action's execution phase.
  2. DYNAMIC: When true, these Action attributes are set by the APF support class during the Action acquisition phase.
  3. CUSTOM: When true, this type of attribute does not have a name that is explicitly defined or known by the APF support class like conventional DYNAMIC attributes but is one for which a value can be generated given some support class specific rule. For example, a table support class may expect that attributes of this type have a name corresponding to a column name and may then set the attribute's value to the data value for that column.


Refer to the individually documented fields of the supplemental properties for examples demonstrating their accessibility methods. The fields also document the default values for these properties which may vary according to the type of attribute.

  1. Class-Based: Attributes defined by the Action class.
  2. Instance-Based: Attributes that are not defined by the Action class. Instead, they are attributes that are added dynamically to the Action instance.


Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

Since:
3.0
See Also:
SwingActionProvider, DynamicAttributeCommandInterface, BaseCommand, BaseActionProvider.getActions(com.sas.actionprovider.ActionSupportFilter), BaseAction.putValue(java.lang.String, java.lang.Object), BaseAction.getAttributeDescriptor(java.lang.String), AttributeDescriptorInterface

Field Summary
 
Fields inherited from interface com.sas.swing.util.Action
ALIGNMENT_CENTER, ALIGNMENT_LEADING, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ALIGNMENT_TRAILING, ALTERNATE_TEXT, COMMAND_CLASS, DISABLED_IMAGE_KEY, GROUP_NAME, IMAGE_KEY, LABEL, LARGE_DISABLED_ICON, LARGE_DISABLED_ICON_NAME, LARGE_ICON, LARGE_ICON_NAME, LONG_DISABLED_DESCRIPTION, LONG_NAME, MNEMONIC_INDEX, ROLLOVER_ICON_NAME, ROLLOVER_IMAGE_KEY, SHORT_DISABLED_DESCRIPTION, SMALL_DISABLED_ICON, SMALL_DISABLED_ICON_NAME, SMALL_ICON_NAME, STYLE_MAP, TARGET, TEXT_ALIGNMENT, TYPE, TYPE_BOOLEAN, TYPE_NORMAL, URL
 
Fields inherited from interface com.sas.actionprovider.ActionStatusKeysInterface
AREA_DISABLED, DISABLED, ENABLED, IS_CURRENT_STATE_DISABLED, MODEL_MEMBER_DISABLED, MODEL_STATE_DISABLED, MODEL_TYPE_DISABLED, UNSUPPORTED, VIEWER_DISABLED
 
Fields inherited from interface com.sas.actionprovider.SupplementalPropertyKeysInterface
COMMAND, CUSTOM, DYNAMIC, ENCODE, EXTERNAL
 
Constructor Summary
SwingAction()
          Default constructor
SwingAction(DynamicAttributeCommandInterface command)
          Command Constructor
 
Method Summary
 
Methods inherited from class com.sas.actionprovider.BaseAction
actionPerformed, addPropertyChangeListener, applyCommandAttributes, clone, executeCommand, fireEvent, getActionStrategy, getActionType, getAttributeDescriptor, getAttributeDescriptors, getCommand, getReturnStatus, getValue, isCustom, performAction, putValue, removePropertyChangeListener, setActionStrategy, setActionType, setAttribute, setCommand, setCustom, setReturnStatus
 
Methods inherited from class com.sas.entities.BaseEntity
containsAttributeNamed, equals, equals, getAttribute, getAttribute, getAttributeCount, getAttributes, getEntityKey, getPropertyDescriptors, getStringAttribute, listAttributeNames, removeAllAttributes, sameEntity, setAttribute, setAttributes, setEntityKey, toString
 

Constructor Detail

SwingAction

public SwingAction()
Default constructor


SwingAction

public SwingAction(DynamicAttributeCommandInterface command)

Command Constructor

Parameters:
command - The command that contains to the logic to execute this action.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.