All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.actionprovider
Class ActionList

    com.sas.actionprovider.ActionList

All Implemented Interfaces:
  BaseEntityInterface, BaseEntityValueInterface, EntityKeyInterface, com.sas.swing.util.ActionList, java.awt.event.ActionListener, java.lang.Cloneable, java.rmi.Remote, java.util.EventListener, javax.swing.Action

    @SASScope(value="ALL")
    public class ActionList

implements com.sas.swing.util.ActionList

Viewer components acquire ActionList objects when they query an ActionProvider for Actions. These object contain the Actions, ActionLists and SEPARATOR objects that the component will present to the user. The order and structure of the elements in the ActionList represents how the component should present them in relation to each other.

For example, all elements on the root-level ActionList may be rendered horizontally in the same order they are present on the root-level ActionList. ActionLists that are elements of the root-level list would be rendered as Menu-type objects such that their items are choices in a drop-down list. ActionLists in the drop-down list may also be rendered as Menu-type object such that their items are presented in a cascading drop-down list.

The fields inherited from the `javax.Swing.Action` and `com.sas.swing.util.Action` classes are names of ActionList attributes that determine the UI characteristics when the lists are presented as Menu-type objects.

To customize the order and structure of the elements that a viewer component receives, developers would need to register a custom `ActionOrderList` with the ActionProvider. These lists are essentially templates that determine the contents of the ActionLists that are acquired by viewer components.

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

- For general information on the ActionProvider Framework, including an overview of how the primary classes of the framework work together, refer to the ``com.sas.actionprovider`` package documentation.

- For examples demonstrating how to use the ActionProvider Framework, including how to override default Actions or add new custom Actions, refer to the Samples Site.

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:
  `BaseActionProvider.getActions(com.sas.actionprovider.ActionSupportFilter)`, `ActionList.SEPARATOR`

Field Summary

Fields inherited from interface com.sas.swing.util.ActionList
`ACTIONS, SEPARATOR`

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`

Constructor Summary
`ActionList()` Default constructor

Method Summary
`void` | `addPropertyChangeListener(java.beans.PropertyChangeListener listener)` Adds a listener for this classes property changes.
`boolean` | `contains(java.lang.String actionType)` Returns a boolean indicating whether the list contains an action with the specified actionType.
`BaseAction` | `get(java.lang.String actionType)` Returns the action with the specified actionType.
`java.util.List` | `getActions()` Returns the delegate list of actions for this list.
`AttributeDescriptorInterface` | `getAttributeDescriptor(java.lang.String attributeName)` Returns the AttributeDescriptorInterface associated with the named attribute.
`java.lang.Object` | `getValue(java.lang.String attributeName)` Get the value of the specified attribute.
`boolean` | `isEmpty()` Returns a boolean indicating whether the ActionList is empty.
`void` | `putValue(java.lang.String attributeName, java.lang.Object attributeValue)` Set the value of the specified key attribute.
`void` | `removePropertyChangeListener(java.beans.PropertyChangeListener listener)` Removes a listener of this classes property changes.
`int` | `size()` Returns the number of Action on the root-level of this ActionList.
`int` | `size(boolean recurse)` Returns the number of Actions in this ActionList.

Methods inherited from class com.sas.entities.BaseEntity
`clone, containsAttributeNamed, equals, equals, getAttribute, getAttribute, getAttributeCount, getAttributes, getEntityKey, getPropertyDescriptors, getStringAttribute, listAttributeNames, removeAllAttributes, removeAttribute, sameEntity, setAttribute, setAttributes, setEntityKey, toString`

Constructor Detail

### ActionList

    public ActionList()

  Default constructor

Method Detail

### getActions

    public java.util.List getActions()

  Returns the delegate list of actions for this list.

  The elements of the list will be of type `Action` or `ActionList` or equal to `SEPARATOR`.

  Convenience method for `(java.util.List)this.getValue (ActionList.ACTIONS)`

  Specified by:
    `getActions` in interface `com.sas.swing.util.ActionList`
  Returns:
    a mutable `java.util.List`; will never return `null`

### get

    public BaseAction get(java.lang.String actionType)

  Returns the action with the specified actionType.

  Returns null if matching actionType not found.

  Parameters:
    `actionType` - The actionType of the action being requested.
  Returns:
    the BaseAction associated with the specified actionType or null if not found.

### contains

    public boolean contains(java.lang.String actionType)

  Returns a boolean indicating whether the list contains an action with the specified actionType.

  Parameters:
    `actionType` - The actionType of the action being requested.
  Returns:
    the boolean indicating whether the list contains an action whose actionType attribute matches the method's actionType argument.

### isEmpty

    public boolean isEmpty()

  Returns a boolean indicating whether the ActionList is empty.

  If there are any instances of Action on the top level of this ActionList, the method returns false. Otherwise, returns true.

  Returns:
    the boolean indicating whether the ActionList is empty.
  See Also:
    `Action`, `isEmpty(boolean)`

### size

    public int size()

  Returns the number of Action on the root-level of this ActionList.

  Returns:
    the number of items in this ActionList
  See Also:
    `Action`, `size(boolean)`

### size

    public int size(boolean recurse)

  Returns the number of Actions in this ActionList.

  Parameters:
    `recurse` - If true, the method recurses through all sublists to find the total number of Actions. If false, only the number of Actions found on the root level of this list are returned.
  Returns:
    the number of Actions in this ActionList.
  See Also:
    `Action`, `size()`

### getValue

    public java.lang.Object getValue(java.lang.String attributeName)

  Get the value of the specified attribute.

  Specified by:
    `getValue` in interface `javax.swing.Action`
  Parameters:
    `attributeName` - the action attribute's name.
  Returns:
    The value object for the action's attribute as specified by the attributeName argument.
  See Also:
    `putValue(java.lang.String, java.lang.Object)`

### putValue

    public void putValue(java.lang.String attributeName,
                         java.lang.Object attributeValue)

  Set the value of the specified key attribute.

  Specified by:
    `putValue` in interface `javax.swing.Action`
  Parameters:
    `attributeName` - the attribute's name.
    `attributeValue` - the value to be set for the attribute.
  Throws:
    `java.lang.IllegalArgumentException` - when an assignment to an Action's attribute fails. Attribute assignment can fail because the value does not satisfy Entity validation constraints.
  See Also:
    `getValue(java.lang.String)`

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

  Adds a listener for this classes property changes.

  Specified by:
    `addPropertyChangeListener` in interface `javax.swing.Action`
  Parameters:
    `listener` - the listener.

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

  Removes a listener of this classes property changes.

  Specified by:
    `removePropertyChangeListener` in interface `javax.swing.Action`
  Parameters:
    `listener` - the listener.

### getAttributeDescriptor

    public AttributeDescriptorInterface getAttributeDescriptor(java.lang.String attributeName)
                                                        throws java.util.NoSuchElementException

  Returns the AttributeDescriptorInterface associated with the named attribute.

  Parameters:
    `attributeName` - The name of the attribute.
  Returns:
    the AttributeDescriptorInterface associated with the named attribute.
  Throws:
    `java.util.NoSuchElementException`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.