All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eNetwork.beans.HOD.MacroActions
java.lang.Object
|
+----com.ibm.eNetwork.beans.HOD.MacroActions
- public class MacroActions
- extends Object
- implements Serializable, MacroParsable, HODConstants
This class is the collection class for the MacroAction objects associated
with a particular instance of a MacroScreen object. All the actions
that will be executed for a particular screen are contained here.
These actions are an ordered sequence, so the functionality of
this class is oriented around indexing.
Generally, this class would be instantiated, the MacroAction objects
would be added, and the MacroActions collection would be added to a
MacroScreen object (assume an ECLScreenDesc object is also added to the
MacroScreen object). The MacroScreen object(s) could then be added to
the Macro bean and the macro played. When the screen appears in the
presentation space that matches the MacroScreen object, the MacroAction
objects in the MacroActions collection will be executed in sequence.
Note that the Macro bean does this all automatically when it parses a
macro file. However, if you want to control the contents of a macro at
the internal object representation level of the macro, you would use
the MacroScreens object and its contained objects.
- See Also:
- MacroAction, MacroScreen, Macro
-
MacroActions()
- Constructs an empty instance of a MacroActions object.
-
MacroActions(Vector)
- Constructs a MacroActions object using the given vector.
-
actions()
- Returns an enumeration of the macro actions in the collection.
-
add(int, MacroAction)
- Inserts the macro action at the given index.
-
add(MacroAction)
- Appends the macro action to the end of the collection.
-
clear()
- Removes all macro actions from the collection
-
clone()
-
-
contains(MacroAction)
- Tests to see if given macro action is in the collection.
-
format(int, boolean)
- Formats the object's contents into a readable string.
-
get(int)
- Returns the macro action at the given index
-
indexOf(MacroAction)
- Returns the index of the given macro action.
-
isEmpty()
- Tests to see if the macro action collection is empty.
-
isPromptAll()
- Returns whether any prompt elements in the collection will be gathered
together and fired in one prompt event.
-
remove(int)
- Removes the macro action at the given index from the collection.
-
remove(MacroAction)
- Removes the given macro action from the collection.
-
set(MacroAction, int)
- Replaces the macro action object at the given index in the collection.
-
setOwner(Macro)
- Sets the owner of the action.
-
setPromptAll(boolean)
- Sets whether any prompt elements in the collection will be gathered
together and fired in one prompt event.
-
size()
- Returns the number of actions in the macro action collection.
MacroActions
public MacroActions()
- Constructs an empty instance of a MacroActions object.
MacroActions
public MacroActions(Vector argActions)
- Constructs a MacroActions object using the given vector.
- Parameters:
- argActions - vector to use in creating the MacroActions object
get
public MacroAction get(int argIndex)
- Returns the macro action at the given index
- Parameters:
- argIndex - index for the MacroAction object
- Returns:
- MacroAction object at the given index
set
public void set(MacroAction argMA,
int argIndex)
- Replaces the macro action object at the given index in the collection.
- Parameters:
- argMA - MacroAction object to place in collection
- argIndex - index for the MacroAction object
add
public void add(MacroAction argMA)
- Appends the macro action to the end of the collection.
- Parameters:
- argMA - MacroAction object to place in collection
add
public void add(int argIndex,
MacroAction argMA)
- Inserts the macro action at the given index. All succeeding macro
actions will be shifted down in the collection.
- Parameters:
- argMA - MacroAction object to place in collection
- argIndex - index for the MacroAction object
contains
public boolean contains(MacroAction argMA)
- Tests to see if given macro action is in the collection.
- Parameters:
- argMA - MacroAction object to look for in collection
- Returns:
- true if MacroAction object is in the collection, false otherwise
isEmpty
public boolean isEmpty()
- Tests to see if the macro action collection is empty.
- Returns:
- true if collection is empty, false otherwise
size
public int size()
- Returns the number of actions in the macro action collection.
- Returns:
- number of actions in the collection
clear
public void clear()
- Removes all macro actions from the collection
remove
public void remove(MacroAction argMA)
- Removes the given macro action from the collection.
- Parameters:
- argMA - MacroAction object to remove from the collection
remove
public void remove(int argIndex)
- Removes the macro action at the given index from the collection.
- Parameters:
- argIndex - index for the MacroAction object to remove
indexOf
public int indexOf(MacroAction argMA)
- Returns the index of the given macro action.
- Parameters:
- argMA - MacroAction object to find index of
- Returns:
- index of the MacroAction object, -1 if object is not in collection
actions
public Enumeration actions()
- Returns an enumeration of the macro actions in the collection.
- Returns:
- macro actions enumeration
setPromptAll
public void setPromptAll(boolean argPromptAll)
- Sets whether any prompt elements in the collection will be gathered
together and fired in one prompt event. If set to true, the Macro bean
will fire all prompts for the currently executing action together.
The default is handle each prompt individually. If prompts are gathered
together and any prompts are unresolved after the event is fired, the
macro bean will fire each unresolved prompts in an individual event.
Unresolved prompts are prompts that don't have a value set for them.
- Parameters:
- argPromptAll - if true all prompts for the current action will
be fired in a single event.
isPromptAll
public boolean isPromptAll()
- Returns whether any prompt elements in the collection will be gathered
together and fired in one prompt event. If true, the Macro bean
will fire all prompts for the currently executing action together.
The default is handle each prompt individually. If prompts are gathered
together and any prompts are unresolved after the event is fired, the
macro bean will fire each unresolved prompts in an individual event.
Unresolved prompts are prompts that don't have a value set for them.
- Returns:
- if true all prompts for the current action will be fired in a
single event.
format
public String format(int argType,
boolean displayAll)
- Formats the object's contents into a readable string. Intended
for visual feedback, as with the MacroDebugActionEvent class.
Note: this method will result in a complete string representation
of the Macro. That is, it calls all the format methods for the
screens, descriptions, nextscreens, actions, etc.
- Parameters:
- argType - reserved, currently only XML strings are supported
- displayAll - if true, optional parameters are formatted also
- Returns:
- formatted string that reflects the contents of the action
setOwner
public void setOwner(Macro mac)
- Sets the owner of the action.
- Parameters:
- mac - new Macro bean owner of the action
clone
public Object clone()
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index