com.sas.actionprovider
Class ActionOrderList

com.sas.actionprovider.ActionOrderList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class ActionOrderList

These lists are the templates that determine the content, order and structure of the ActionLists that are presented by viewer components.

Certain elements in an ActionOrderList map to certain elements of an ActionList.

At the support class level, there is default ActionOrderList for each areaType that a particular class supports. By modifying or replacing such an ActionOrderList, a user may customize the order and structure of the Actions and SEPARATORS that are returned by the APF. Further, a user is able to hide unwanted Actions or SEPARATORS by removing their respective entries from the appropriate ActionOrderList.

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



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.1
See Also:
BaseActionProvider.setActionOrderList(java.lang.String, com.sas.actionprovider.ActionOrderList, com.sas.actionprovider.ActionProviderViewInterface, java.lang.String), ActionList.SEPARATOR, Serialized Form

Constructor Summary
ActionOrderList()
          Default constructor
ActionOrderList(java.lang.String name)
          List name Constructor
ActionOrderList(java.lang.String name, int initialCapacity)
          Name and initialCapacity constructor.
 
Method Summary
 void add(int index, java.lang.Object element)
          Add an element to this ActionOrderList at the specified index.
 boolean add(java.lang.Object element)
          Appends an element to the end of this ActionOrderList.
 boolean addAll(java.util.Collection collection)
          Appends all elements of the given collection to the end of this ActionOrderList.
 boolean addAll(int index, java.util.Collection collection)
          Add all the elements of the given collection to this ActionOrderList beginning at the specified index.
 void addElement(java.lang.Object element)
          Appends the specified element to the end of this ActionOrderList.
 boolean contains(java.lang.Object element)
          Returns the boolean indicating whether the specified element is in the ActionOrderList.
 java.lang.String getActionType()
          Returns the actionType attribute which identifies the Action to which this ActionOrderList is associated at the support class level.
 java.lang.String getName()
          Returns the name of this ActionOrderList.
 java.util.Map getRootRenderInfoMap()
          Returns the Map that contains rendering information for the root level ActionList.
 boolean isEnabledIfEmpty()
          Returns the boolean indicating if the ActionList corresponding to this ActionOrderList should be returned if the ActionList is empty.
 void setActionType(java.lang.String actionType)
          Sets the actionType attribute which identifies the Action to which this ActionOrderList is associated at the support class level.
 void setEnabledIfEmpty(boolean enabledIfEmpty)
          Sets the boolean indicating if the ActionList corresponding to this ActionOrderList should be returned if the ActionList is empty.
 void setName(java.lang.String name)
          The name of this ActionOrderList If this ActionOrderList's actionType attribute is not set, then this value is used as the Action.NAME on the corresponding ActionList.
 void setRootRenderInfoMap(java.util.Map rootRenderInfoMap)
          Set the Map that contains rendering information for the root level ActionList.
 

Constructor Detail

ActionOrderList

public ActionOrderList()
Default constructor


ActionOrderList

public ActionOrderList(java.lang.String name)

List name Constructor

Parameters:
name - The name of this ActionOrderList

ActionOrderList

public ActionOrderList(java.lang.String name,
                       int initialCapacity)

Name and initialCapacity constructor.

Parameters:
name - The name of this ActionOrderList
initialCapacity - The initial capacity of this list.
Method Detail

setName

public void setName(java.lang.String name)
The name of this ActionOrderList

If this ActionOrderList's actionType attribute is not set, then this value is used as the Action.NAME on the corresponding ActionList.

Parameters:
name - The name of this ActionOrderList
See Also:
getName(), Action.NAME

getName

public java.lang.String getName()
Returns the name of this ActionOrderList.

If this ActionOrderList's actionType attribute is not set, then this value is used as the Action.NAME on the corresponding ActionList.

Returns:
the name of this ActionOrderList
See Also:
setName(java.lang.String), Action.NAME

isEnabledIfEmpty

public boolean isEnabledIfEmpty()

Returns the boolean indicating if the ActionList corresponding to this ActionOrderList should be returned if the ActionList is empty.

Returns:
The boolean which indicates if the ActionList corresponding to this ActionOrderList should be returned if the ActionList is empty.
See Also:
setEnabledIfEmpty(boolean)

setEnabledIfEmpty

public void setEnabledIfEmpty(boolean enabledIfEmpty)

Sets the boolean indicating if the ActionList corresponding to this ActionOrderList should be returned if the ActionList is empty.

Parameters:
enabledIfEmpty - the boolean indicating if the ActionList corresponding to this ActionOrderList should be returned if the ActionList is empty.
See Also:
isEnabledIfEmpty()

getActionType

public java.lang.String getActionType()
Returns the actionType attribute which identifies the Action to which this ActionOrderList is associated at the support class level.

A user may customize the appearance, availability or functionality of the returned ActionList by changing the attributes of the registered Action to which this actionType maps.

Returns:
a String representing the actionType.
See Also:
setActionType(java.lang.String)

setActionType

public void setActionType(java.lang.String actionType)
Sets the actionType attribute which identifies the Action to which this ActionOrderList is associated at the support class level.

If this value is not set, the framework assumes that there is no Action associated with this list and just returns an ActionList with the same name as this ActionOrderList.

If the value is set, the framework returns an ActionList whose Action attributes are derived from the registered action with the same actionType.

A user may customize the appearance, availability or functionality of the returned ActionList by changing the attributes of the registered Action to which this actionType maps.

Parameters:
actionType - an String representing the action supportType.
See Also:
getActionType(), getName()

add

public void add(int index,
                java.lang.Object element)
Add an element to this ActionOrderList at the specified index.

Only the following types of Objects are valid:

Specified by:
add in interface java.util.List
Overrides:
add in class java.util.Vector
Parameters:
index - The position to add the element.
element - The element to add.
Throws:
java.lang.IllegalArgumentException - if element is not one of the valid types.

add

public boolean add(java.lang.Object element)
Appends an element to the end of this ActionOrderList.

Only the following types of Objects are valid:

Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.Vector
Parameters:
element - The object to add.
Returns:
true if this list changed as a result of the call.
Throws:
java.lang.IllegalArgumentException - if element is not one of the valid types.

addAll

public boolean addAll(java.util.Collection collection)
Appends all elements of the given collection to the end of this ActionOrderList.

Only the following types of Objects are valid:

Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.Vector
Parameters:
collection - The collection of items to add.
Returns:
true if this list changed as a result of the call.
Throws:
java.lang.IllegalArgumentException - if one of the elements in the Collection is not one of the valid types.

addAll

public boolean addAll(int index,
                      java.util.Collection collection)
Add all the elements of the given collection to this ActionOrderList beginning at the specified index.

Only the following types of Objects are valid:

Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.Vector
Parameters:
index - The index position to begin adding items.
collection - The collection of items to add.
Returns:
true if this list changed as a result of the call.
Throws:
java.lang.IllegalArgumentException - if one of the elements in the Collection is not one of the valid types.

addElement

public void addElement(java.lang.Object element)
Appends the specified element to the end of this ActionOrderList.

Only the following types of Objects are valid:

Overrides:
addElement in class java.util.Vector
Parameters:
element - The Object to add
Throws:
java.lang.IllegalArgumentException - if the specified element is not one of the valid types.

contains

public boolean contains(java.lang.Object element)
Returns the boolean indicating whether the specified element is in the ActionOrderList.

The element must be one of the following:

Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.List
Overrides:
contains in class java.util.Vector
Parameters:
element - The Object to look for in the list.
Returns:
the boolean indicating whether the specified element is in the ActionOrderList.
Throws:
java.lang.IllegalArgumentException - if the specified element is not one of the valid types.

setRootRenderInfoMap

public void setRootRenderInfoMap(java.util.Map rootRenderInfoMap)
Set the Map that contains rendering information for the root level ActionList.

For example:

map.put( com.sas.swing.util.Action.STYLE_MAP, yourStyleMap );

Parameters:
rootRenderInfoMap - the Map that contains rendering information for the root level ActionList.
See Also:
ActionList

getRootRenderInfoMap

public java.util.Map getRootRenderInfoMap()

Returns the Map that contains rendering information for the root level ActionList.

Returns:
the Map that contains specific rendering information for the root level ActionList.
See Also:
ActionList



Copyright © 2009 SAS Institute Inc. All Rights Reserved.