|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.actionprovider.ActionList
public class 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
package documentation.
com.sas.actionprovider
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 .
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 |
---|
public ActionList()
Method Detail |
---|
public java.util.List getActions()
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)
getActions
in interface com.sas.swing.util.ActionList
java.util.List
; will never return null
public BaseAction get(java.lang.String actionType)
Returns null if matching actionType not found.
actionType
- The actionType of the action being requested.
public boolean contains(java.lang.String actionType)
Returns a boolean indicating whether the list contains an action with the specified actionType.
actionType
- The actionType of the action being requested.
public boolean isEmpty()
If there are any instances of Action on the top level of this ActionList, the method returns false. Otherwise, returns true.
Action
,
isEmpty(boolean)
public int size()
Returns the number of Action on the root-level of this ActionList.
Action
,
size(boolean)
public int size(boolean recurse)
Returns the number of Actions in this ActionList.
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.
Action
,
size()
public java.lang.Object getValue(java.lang.String attributeName)
Get the value of the specified attribute.
getValue
in interface javax.swing.Action
attributeName
- the action attribute's name.
putValue(java.lang.String, java.lang.Object)
public void putValue(java.lang.String attributeName, java.lang.Object attributeValue)
Set the value of the specified key attribute.
putValue
in interface javax.swing.Action
attributeName
- the attribute's name.attributeValue
- the value to be set for the attribute.
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.getValue(java.lang.String)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener for this classes property changes.
addPropertyChangeListener
in interface javax.swing.Action
listener
- the listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface javax.swing.Action
listener
- the listener.public AttributeDescriptorInterface getAttributeDescriptor(java.lang.String attributeName) throws java.util.NoSuchElementException
attributeName
- The name of the attribute.
java.util.NoSuchElementException
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |