All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eNetwork.beans.HOD.MacroActionExtract
java.lang.Object
|
+----com.ibm.eNetwork.beans.HOD.MacroAction
|
+----com.ibm.eNetwork.beans.HOD.MacroActionExtract
- public class MacroActionExtract
- extends MacroAction
- implements ECLConstants
This class represents one extract action associated with a MacroScreen
object. The extract action is used for retrieving text data from the
host screen during a macro play.
If the Macro bean encounters an extract action during playing, the
Macro bean will "scrape" the data from the rectangular area specified
by the extract action and fire it to any extract listeners (in
MacroRuntimeListener). If there are no runtime listeners, the Macro
bean does nothing for extract actions.
The extract action can also assemble extract data based on the fields
on the screen. This makes it possible to assemble the screen data into
"rows" even though some fields might wrap around to the next line. If
a field wraps, all it's data will be added to the extract data as if it
were on the same line. The data will not be split amongst two lines
like a normal extract would. Call the setUnwrap method with a true
value to turn on this behavior.
- See Also:
- Macro, MacroRuntimeListener
-
MacroActionExtract()
- Constructs an empty instance of a macro extract.
-
MacroActionExtract(int, int, int, int, String)
- Constructs a functional instance of a macro extract with the given
parameters.
-
execute()
- Executes the macro extract action.
-
format(int, boolean)
- Formats the action object's contents into a readable string.
-
getECol()
- Returns the lower right column for the extract area.
-
getERow()
- Returns the lower right row for the extract area.
-
getName()
- Returns the identifying name for the extract.
-
getSCol()
- Returns the upper left column for the extract area.
-
getSRow()
- Returns the upper left row for the extract area.
-
isUnwrap()
- Returns whether the extract action will assemble extract data based
on the fields on the screen.
-
setECol(int)
- Sets the lower right column for the extract area.
-
setERow(int)
- Sets the lower right row for the extract area.
-
setName(String)
- Sets the identifying name for the extract.
-
setSCol(int)
- Sets the upper left column for the extract area.
-
setSRow(int)
- Sets the upper left row for the extract area.
-
setUnwrap(boolean)
- If set to true, the extract action will assemble extract data based
on the fields on the screen.
MacroActionExtract
public MacroActionExtract()
- Constructs an empty instance of a macro extract.
If you use this constructor you must call all the set methods of this
class to properly set up the action.
MacroActionExtract
public MacroActionExtract(int argSRow,
int argSCol,
int argERow,
int argECol,
String argName)
- Constructs a functional instance of a macro extract with the given
parameters.
- Parameters:
- argSRow - upper left row for the extract area
- argSCol - upper left column for the extract area
- argERow - lower right row for the extract area
- argECol - lower right column for the extract area
- argName - name of the extract, used for identification
execute
public void execute()
- Executes the macro extract action. Note: you must use the setECLSession,
setRuntimeListeners and setOwner methods before calling execute, or the
execute method will throw a NullPointerException.
- Overrides:
- execute in class MacroAction
- See Also:
- MacroAction
getSRow
public int getSRow()
- Returns the upper left row for the extract area.
- Returns:
- upper left row
setSRow
public void setSRow(int argSRow)
- Sets the upper left row for the extract area.
- Parameters:
- argSRow - upper left row for the extract area
getSCol
public int getSCol()
- Returns the upper left column for the extract area.
- Returns:
- upper left column
setSCol
public void setSCol(int argSCol)
- Sets the upper left column for the extract area.
- Parameters:
- argSCol - upper left column for the extract area
getERow
public int getERow()
- Returns the lower right row for the extract area.
- Returns:
- lower right row
setERow
public void setERow(int argERow)
- Sets the lower right row for the extract area.
- Parameters:
- argERow - lower right row for the extract area
getECol
public int getECol()
- Returns the lower right column for the extract area.
- Returns:
- lower right column
setECol
public void setECol(int argECol)
- Sets the lower right column for the extract area.
- Parameters:
- argECol - lower right column for the extract area
getName
public String getName()
- Returns the identifying name for the extract.
- Returns:
- name of the extract
setName
public void setName(String argName)
- Sets the identifying name for the extract.
- Parameters:
- argName - name of the extract used for identification
setUnwrap
public void setUnwrap(boolean argVal)
- If set to true, the extract action will assemble extract data based
on the fields on the screen. This makes it possible to assemble the
screen data into "rows" even though some fields might wrap around to
the next line. If a field wraps, all it's text will be put into a
single String in the data array. The data will not be split amongst
two lines like a normal extract would.
- Parameters:
- argVal - if true, fields will be unwrapped
isUnwrap
public boolean isUnwrap()
- Returns whether the extract action will assemble extract data based
on the fields on the screen. This makes it possible to assemble the
screen data into "rows" even though some fields might wrap around to
the next line. If a field wraps, all it's text will be put into a
single String in the data array. The data will not be split amongst
two lines like a normal extract would.
- Returns:
- if true, fields will be unwrapped
format
public String format(int argType,
boolean displayAll)
- Formats the action object's contents into a readable string. Intended
for visual feedback, as with the MacroDebugActionEvent class.
- Parameters:
- argType - reserved, currently only XML strings are supported
- formatAll - if true, optional parameters will be formatted also
- Returns:
- formatted string that reflects the contents of the action
- Overrides:
- format in class MacroAction
All Packages Class Hierarchy This Package Previous Next Index