All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eNetwork.beans.HOD.MacroScreens
java.lang.Object
|
+----com.ibm.eNetwork.beans.HOD.MacroScreens
- public class MacroScreens
- extends Object
- implements Serializable, MacroParsable, HODConstants
This class is the collection class for the MacroScreen objects
associated with a particular macro. All the screens to be recognized
by the Macro bean are contained here.
Generally, this class would be instantiated and the MacroScreen objects
would be added. The MacroScreens object 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 or records user interaction when linked to a Terminal bean.
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:ECLScreenDesc
- See Also:
- MacroActions, MacroAction, MacroScreen, Macro
-
MacroScreens()
- Constructs an empty instance of a MacroScreens object.
-
MacroScreens(Vector)
- Constructs a MacroScreens object using the given vector.
-
add(int, MacroScreen)
- Inserts the macro screen at the given index.
-
add(MacroScreen)
- Appends the macro screen to the end of the collection.
-
clear()
- Removes all macro screens from the collection
-
clone()
- Returns a new instance of MacroScreens with the same state as the current
MacroScreens object.
-
contains(MacroScreen)
- Tests to see if the given macro screen is in the collection.
-
contains(String)
- Tests to see if the given macro screen with given Name is in the collection.
-
containsStartScreen()
- Returns whether the macro screens collection contains at least one
start screen.
-
containsStopScreen()
- Returns whether the macro screens collection contains at least one
stop screen.
-
format(int, boolean)
- Formats the contents of the object into a readable string.
-
get(int)
- Returns the macro screen at the given index
-
getAuthor()
- Returns the author of the macro.
-
getByName(String)
- Convenience method that returns a macro screen that has the given
Name.
-
getDate()
- Returns the date the macro was created or changed.
-
getDescription()
- Returns the description of the macro.
-
getName()
- Returns the name of the macro.
-
getPauseTime()
- Returns the pause time for the macro.
-
getTimeout()
- Returns the default next screens timeout value for the macro.
-
getUniqueName()
- Returns a unique screen Name string for a possible MacroScreen object
to be added to the collection.
-
indexOf(MacroScreen)
- Returns the index of the given macro screen.
-
isEmpty()
- Tests to see if the macro screen collection is empty.
-
isInitialPrompt()
- Returns whether the Macro bean should scan this macro for prompts
at the beginning of play and fire them all at once to prompt listeners.
-
isSuppressClearEvent()
- Returns whether the system should ignore screen events when a
host application sends a clear screen command immediately followed
by an end of record indicator in the data stream.
-
remove(int)
- Removes the macro screen at the given index from the collection.
-
remove(MacroScreen)
- Removes the given macro screen from the collection.
-
screens()
- Returns an enumeration of the macro screens in the collection.
-
set(MacroScreen, int)
- Replaces the macro screen object at the given index in the collection.
-
setAuthor(String)
- Sets the author of the macro.
-
setDate(String)
- Sets the date the macro was created or changed.
-
setDescription(String)
- Sets the description of the macro.
-
setInitialPrompt(boolean)
- Sets whether the Macro bean should scan this macro for prompts
at the beginning of play and fire them all at once to prompt listeners.
-
setName(String)
- Sets the name of the macro.
-
setOwner(Macro)
- Sets the owner of the action.
-
setPauseTime(int)
- Sets the pause time for the macro.
-
setSuppressClearEvent(boolean)
- Sets whether the system should ignore screen events when a
host application sends a clear screen command immediately followed
by an end of record indicator in the data stream.
-
setTimeout(int)
- Sets the default next screens timeout value for the macro.
-
size()
- Returns the number of screens in the macro screen collection.
MacroScreens
public MacroScreens()
- Constructs an empty instance of a MacroScreens object.
MacroScreens
public MacroScreens(Vector argScreens)
- Constructs a MacroScreens object using the given vector.
- Parameters:
- argScreens - Vector of MacroScreen objects
- See Also:
- MacroScreen
get
public MacroScreen get(int argIndex)
- Returns the macro screen at the given index
- Parameters:
- argIndex - index for the MacroScreen object
- Returns:
- MacroScreen object at the given index
set
public void set(MacroScreen argMS,
int argIndex)
- Replaces the macro screen object at the given index in the collection.
- Parameters:
- argMS - MacroScreen object to place in collection
- argIndex - index for the MacroScreen object The name of the screen must be set to use this method
add
public void add(MacroScreen argMS)
- Appends the macro screen to the end of the collection.
- Parameters:
- argMS - MacroScreen object to place in collection
add
public void add(int argIndex,
MacroScreen argMS)
- Inserts the macro screen at the given index. All succeeding macro
actions will be shifted down in the collection.
- Parameters:
- argMS - MacroScreen object to place in collection
- argIndex - index for the MacroScreen object
contains
public boolean contains(MacroScreen argMS)
- Tests to see if the given macro screen is in the collection.
- Parameters:
- argMS - MacroScreen object to search for
- Returns:
- true if MacroScreen object is in the collection, false otherwise
contains
public boolean contains(String argName)
- Tests to see if the given macro screen with given Name is in the collection.
- Parameters:
- argName - MacroScreen object Name
- Returns:
- true if MacroScreen object is in the collection, false otherwise
getUniqueName
public String getUniqueName()
- Returns a unique screen Name string for a possible MacroScreen object
to be added to the collection.
- Returns:
- Name string that is unique for a new MacroScreen object
isEmpty
public boolean isEmpty()
- Tests to see if the macro screen collection is empty.
- Returns:
- true if collection is empty, false otherwise
size
public int size()
- Returns the number of screens in the macro screen collection.
- Returns:
- number of screens in the collection
clear
public void clear()
- Removes all macro screens from the collection
remove
public void remove(MacroScreen argMS)
- Removes the given macro screen from the collection. The name of the screen must be set to use this method
- Parameters:
- argMS - MacroScreen object to remove from the collection
- See Also:
- setName
remove
public void remove(int argIndex)
- Removes the macro screen at the given index from the collection.
- Parameters:
- argIndex - index for the MacroScreen object to remove
indexOf
public int indexOf(MacroScreen argMS)
- Returns the index of the given macro screen.
- Parameters:
- argMS - MacroScreen object to find index of
- Returns:
- index of the MacroScreen object, -1 if object is not in collection
screens
public Enumeration screens()
- Returns an enumeration of the macro screens in the collection.
- Returns:
- macro screens enumeration
getByName
public MacroScreen getByName(String argName)
- Convenience method that returns a macro screen that has the given
Name. Note that this Name string should be unique in the macro.
- Parameters:
- argName - string Name to search for
- Returns:
- macro screen with the given description
containsStartScreen
public boolean containsStartScreen()
- Returns whether the macro screens collection contains at least one
start screen. If there is a start screen in the MacroScreens collection,
all non-start screens will be ignored until the start screen is recognized.
- Returns:
- if true, a start screen exists in the collection
containsStopScreen
public boolean containsStopScreen()
- Returns whether the macro screens collection contains at least one
stop screen. If there is a stop screen in the MacroScreens collection,
the Macro bean will halt playing after a stop screen is recognized
and its actions have been executed.
- Returns:
- if true, a stop screen exists in the collection
getName
public String getName()
- Returns the name of the macro.
- Returns:
- macro name
setName
public void setName(String argName)
- Sets the name of the macro.
- Parameters:
- argName - new name for the macro
getDescription
public String getDescription()
- Returns the description of the macro.
- Returns:
- macro description
setDescription
public void setDescription(String argDesc)
- Sets the description of the macro.
- Parameters:
- argDesc - new macro description
getAuthor
public String getAuthor()
- Returns the author of the macro.
- Returns:
- macro author
setAuthor
public void setAuthor(String argAuthor)
- Sets the author of the macro.
- Parameters:
- argAuthor - new macro author
getDate
public String getDate()
- Returns the date the macro was created or changed. This is not
automatically set by the Macro bean. The user must call this method.
- Returns:
- macro date
setDate
public void setDate(String argDate)
- Sets the date the macro was created or changed. This is not
automatically set by the Macro bean. The user must call this method.
- Parameters:
- argDate - new macro date
isInitialPrompt
public boolean isInitialPrompt()
- Returns whether the Macro bean should scan this macro for prompts
at the beginning of play and fire them all at once to prompt listeners.
- Returns:
- true if Macro bean should prescan for prompts
setInitialPrompt
public void setInitialPrompt(boolean argVal)
- Sets whether the Macro bean should scan this macro for prompts
at the beginning of play and fire them all at once to prompt listeners.
- Parameters:
- argVal - if true, Macro bean will prescan for prompts
isSuppressClearEvent
public boolean isSuppressClearEvent()
- Returns whether the system should ignore screen events when a
host application sends a clear screen command immediately followed
by an end of record indicator in the data stream.
This is an advanced feature and the default is false. You may want
to set this value to true if you have screens in your application
flow that have all blanks in them. If there is a valid blank screen
in the macro and clear events are not ignored, it is possible that
an ill-behaved host application can send a clear then end of record,
a screen recognition event is processed, and the valid blank screen
matches when it shouldn't have.
- Returns:
- true if system ignores clear screen commands followed by
end of record indicators
setSuppressClearEvent
public void setSuppressClearEvent(boolean argVal)
- Sets whether the system should ignore screen events when a
host application sends a clear screen command immediately followed
by an end of record indicator in the data stream.
This is an advanced feature and the default is false. You may want
to set this value to true if you have screens in your application
flow that have all blanks in them. If there is a valid blank screen
in the macro and clear events are not ignored, it is possible that
an ill-behaved host application can send a clear then end of record,
a screen recognition event is processed, and the valid blank screen
matches when it shouldn't have.
- Parameters:
- argVal - if true, system ignores clear screen commands followed by
end of record indicators
getTimeout
public int getTimeout()
- Returns the default next screens timeout value for the macro. This
value can be overridden in each MacroNextScreen object in each MacroScreens.
- Returns:
- default timeout value in milliseconds.
setTimeout
public void setTimeout(int argTimeout)
- Sets the default next screens timeout value for the macro. This
value can be overridden in each MacroScreen in each MacroNextScreens object.
- Parameters:
- argTimeout - new timeout value in milliseconds
getPauseTime
public int getPauseTime()
- Returns the pause time for the macro. This pause is performed in
between each screen and in between each action to ensure that the
host system has quieted down. If your host system is slow, this
value should be increased past the default of 300 milliseconds.
- Returns:
- pause time for the macro in milliseconds.
setPauseTime
public void setPauseTime(int argPause)
- Sets the pause time for the macro. This pause is performed in
between each screen and in between each action to ensure that the
host system has quieted down. If your host system is slow, this
value should be increased past the default of 300 milliseconds.
- Parameters:
- argPause - new pause time in milliseconds
clone
public Object clone()
- Returns a new instance of MacroScreens with the same state as the current
MacroScreens object.
- Returns:
- copy of current MacroScreens object
- Overrides:
- clone in class Object
format
public String format(int argType,
boolean displayAll)
- Formats the contents of the object 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, next-screens, 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
All Packages Class Hierarchy This Package Previous Next Index