All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eNetwork.ECL.ECLScreenDesc
java.lang.Object
|
+----com.ibm.eNetwork.ECL.ECLScreenDesc
- public class ECLScreenDesc
- extends Object
- implements Serializable
ECLScreenDesc is the class that is used to "describe" a screen
for IBM's Host Access Class Library Screen Recognition Technology.
It uses all four major planes of the presentation space to describe
it (TEXT, FIELD, EXFIELD, COLOR), as well as the cursor position and OIA status.
Using the methods provided on this object, the programmer can set
up a detailed description of what a given screen "looks like" in
a host side application. Once an ECLScreenDesc object is created
and set, it may be passed to either the synchronous WaitFor... methods
provided on ECLPS, or it may be passed to ECLScreenReco,
which fires an asynchronous event if the screen matching the
ECLScreenDesc object appears in the PS.
Note on the optional parameter on the Addxxx methods:
ECLScreenReco uses the following logic for recognizing, or matching
ECLScreenDesc objects, which contain ECLScreenDescriptor-derived objects,
against the data in an ECLPS object:
- All ECLScreenDescriptor-derived objects in an ECLScreenDesc object
registered with an ECLScreenReco object that are not optional must pass.
- If there are no non-optional descriptors, at least one optional
descriptor must match.
- See Also:
- ECLScreenReco, ECLScreenDescriptor, ECLSDAttrib, ECLSDCursor, ECLSDCustom, ECLSDFields, ECLSDInputFields, ECLSDOIA, ECLSDString, ECLPS
-
DONTCARE
- Constant for AddOIAInhibitStatus.
-
NOTINHIBITED
- Constant for AddOIAInhibitStatus.
-
ECLScreenDesc()
- Creates an empty instance of ECLScreenDesc.
-
ECLScreenDesc(String)
- Creates an instance of ECLScreenDesc from a persistent ECLScreen
string.
-
AddAttrib(char, int, int, int)
- Adds an attribute value to the screen description.
-
AddAttrib(char, int, int, int, boolean)
- Adds an attribute value to the screen description.
-
AddCursorPos(int, int)
- Sets the cursor position for the screen description.
-
AddCursorPos(int, int, boolean)
- Sets the cursor position for the screen description.
-
AddCustom(ECLCustomRecoListener, String)
- Adds a custom recognition listener with a given ID.
-
AddCustom(ECLCustomRecoListener, String, boolean)
- Adds a custom recognition listener with a given ID.
-
AddDescriptor(ECLScreenDescriptor)
- Adds a descriptor to the screen description.
-
AddNumFields(int)
- Adds the total field count of a screen to the screen description.
-
AddNumFields(int, boolean)
- Adds the total field count of a screen to the screen description.
-
AddNumInputFields(int)
- Adds the input field count of a screen to the screen description.
-
AddNumInputFields(int, boolean)
- Adds the input field count of a screen to the screen description.
-
AddOIAInhibitStatus(int)
- Turns on waiting on OIA inhibit status in the screen description.
-
AddOIAInhibitStatus(int, boolean)
- Turns on waiting on OIA inhibit status in the screen description.
-
AddString(String)
- Adds a string to the screen description.
-
AddString(String, int, int)
- Adds a string starting at the an exact row/col position to the
screen description.
-
AddString(String, int, int, boolean)
- Adds a string starting at the an exact row/col position to the
screen description, allowing you to specify case sensitivity.
-
AddString(String, int, int, boolean, boolean)
- Adds a string starting at the an exact row/col position to the
screen description, allowing you to specify case sensitivity.
-
AddStringInRect(String, int, int, int, int)
- Adds a string to the screen description.
-
AddStringInRect(String, int, int, int, int, boolean)
- Adds a string to the screen description.
-
AddStringInRect(String, int, int, int, int, boolean, boolean)
- Adds a string to the screen description.
-
AttribToString(char)
- Converts a character attribute value to a hex string.
-
Clear()
- Member method that clears the data in the ECLScreenDesc object.
-
Descriptors()
- Returns an enumeration of all the descriptors for the ECLScreenDesc
object.
-
GetDescriptors()
- Returns the descriptor collection object for the ECLScreenDesc class.
-
GetName()
- Returns unique name for the screen description.
-
GetSDAttribs()
- Returns a collection of the attribute screen descriptors for the
ECLScreenDesc object.
-
GetSDCursor()
- Returns the cursor screen descriptor for the ECLScreenDesc object.
-
GetSDCustom()
- Returns a collection of the custom screen descriptors for the
ECLScreenDesc object.
-
GetSDCustom(String)
- Returns the custom recognition screen descriptor for the ECLScreenDesc
object that has the given ID.
-
GetSDFields()
- Returns the field count screen descriptor for the ECLScreenDesc object.
-
GetSDInputFields()
- Returns the input field count screen descriptor for the ECLScreenDesc object.
-
GetSDOIA()
- Returns the OIA state screen descriptor for the ECLScreenDesc object.
-
GetSDStrings()
- Returns a collection of the string screen descriptors for the
ECLScreenDesc object.
-
IsActive()
- Returns whether the ECLScreenDesc object should be monitored if
it is registered with the ECLScreenReco system.
-
IsMatch()
- Returns whether the description matched in the ECLScreenReco
matching algorithm.
-
IsTransient()
- Returns whether the screen description is transient.
-
PlaneToString(int)
- Takes a plane value and converts it into a string representation of a
plane constant.
-
RemoveDescriptor(ECLScreenDescriptor)
- Removes a descriptor from the screen description.
-
SetActive(boolean)
- Sets whether the ECLScreenDesc object should be monitored if
it is registered with the ECLScreenReco system.
-
SetCustomListener(ECLCustomRecoListener, String)
- Registers a custom recognition listener with a given ID.
-
SetDescriptors(Vector)
- Sets the descriptor collection object for the ECLScreenDesc class.
-
SetName(String)
- Sets the unique name for the screen description.
-
SetTransient(boolean)
- Sets the screen description as transient.
-
StringToAttrib(String)
- Converts a hex string (0x00) to a character attribute.
-
StringToPlane(String)
- Takes a string representation of a plane constant and converts it into a
plane value.
-
toString()
- This method is used to serialize an ECLScreenDesc object.
DONTCARE
public static final int DONTCARE
- Constant for AddOIAInhibitStatus. Pass this value to remove OIA
monitoring for the screen. The default value is NOTINHIBITED.
NOTINHIBITED
public static final int NOTINHIBITED
- Constant for AddOIAInhibitStatus. Pass this value to add OIA
monitoring for the screen. This is the default value.
ECLScreenDesc
public ECLScreenDesc()
- Creates an empty instance of ECLScreenDesc.
ECLScreenDesc
public ECLScreenDesc(String str)
- Creates an instance of ECLScreenDesc from a persistent ECLScreen
string.
- See Also:
- toString
toString
public String toString()
- This method is used to serialize an ECLScreenDesc object. Use this
method to produce a persistent representation of ECLScreenDesc. For
example, if you wish to save an ECLScreenDesc object to disk, call
this method and write the string it returns to disk. This string can
then be used to construct an ECLScreenDesc object using the appropriate
constructor.
- Overrides:
- toString in class Object
- See Also:
- ECLScreenDesc
Clear
public void Clear()
- Member method that clears the data in the ECLScreenDesc object.
AddCursorPos
public synchronized void AddCursorPos(int row,
int col)
- Sets the cursor position for the screen description.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- row - Cursor row
- col - Cursor column
AddCursorPos
public synchronized void AddCursorPos(int row,
int col,
boolean optional)
- Sets the cursor position for the screen description.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- row - Cursor row
- col - Cursor column
- optional - Cursor comparison will be optional in ECLScreenReco
AddAttrib
public synchronized void AddAttrib(char attrib,
int row,
int col,
int plane)
- Adds an attribute value to the screen description.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- attrib - Attribute to add to description.
- row - Row position for attribute
- col - Column position for attribute
- plane - Plane in PS where attribute resides
See Also:
Appendix B. Host Access Class Library Planes -- Format and Content
AddAttrib
public synchronized void AddAttrib(char attrib,
int row,
int col,
int plane,
boolean optional)
- Adds an attribute value to the screen description.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- attrib - Attribute to add to description.
- row - Row position for attribute
- col - Column position for attribute
- plane - Plane in PS where attribute resides
- optional - Comparison will be optional in ECLScreenReco
AddNumFields
public synchronized void AddNumFields(int num)
- Adds the total field count of a screen to the screen description.
- Parameters:
- num - Number of fields.
AddNumFields
public synchronized void AddNumFields(int num,
boolean optional)
- Adds the total field count of a screen to the screen description.
- Parameters:
- num - Number of fields.
- optional - Comparison will be optional in ECLScreenReco
AddNumInputFields
public synchronized void AddNumInputFields(int num)
- Adds the input field count of a screen to the screen description.
- Parameters:
- num - Number of fields.
AddNumInputFields
public synchronized void AddNumInputFields(int num,
boolean optional)
- Adds the input field count of a screen to the screen description.
- Parameters:
- num - Number of fields.
- optional - Comparison will be optional in ECLScreenReco
AddOIAInhibitStatus
public synchronized void AddOIAInhibitStatus(int type)
- Turns on waiting on OIA inhibit status in the screen description. A
screen will not match a screen description unless the OIA condition
is met. By default, the screen description has NOTINHIBITED
turned on.
- Parameters:
- type - OIA condition of the screen description. The valid
constant values follow:
- DONTCARE
- NOTINHIBITED
AddOIAInhibitStatus
public synchronized void AddOIAInhibitStatus(int type,
boolean optional)
- Turns on waiting on OIA inhibit status in the screen description. A
screen will not match a screen description unless the OIA condition
is met. By default, the screen description has NOTINHIBITED
turned on.
- Parameters:
- type - OIA condition of the screen description. The valid
constant values follow:
- DONTCARE
- NOTINHIBITED
- optional - Comparison will be optional in ECLScreenReco
AddString
public synchronized void AddString(String text)
- Adds a string to the screen description. The screen will match if
the string exists at any place in the Presentation Space. This Adds
string as case sensitive.
- Parameters:
- text - String to add
- See Also:
- AddString, AddString
AddString
public synchronized void AddString(String text,
int row,
int col)
- Adds a string starting at the an exact row/col position to the
screen description. Adds string as case sensitive.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- text - String to add
- row - Starting row for EXACT or IN_RECT location type.
- col - Starting column for EXACT or IN_RECT location type.
- See Also:
- AddString, AddString
AddString
public synchronized void AddString(String text,
int row,
int col,
boolean caseSensitive)
- Adds a string starting at the an exact row/col position to the
screen description, allowing you to specify case sensitivity.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- text - String to add
- row - Starting row for EXACT or IN_RECT location type.
- col - Starting column for EXACT or IN_RECT location type.
- caseSensitive - Indicates whether exact case should be used.
- true - use exact case.
- false - do not use exact case.
- See Also:
- AddString, AddString
AddString
public synchronized void AddString(String text,
int row,
int col,
boolean caseSensitive,
boolean optional)
- Adds a string starting at the an exact row/col position to the
screen description, allowing you to specify case sensitivity.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- text - String to add
- row - Starting row for EXACT or IN_RECT location type.
- col - Starting column for EXACT or IN_RECT location type.
- caseSensitive - Indicates whether exact case should be used.
- true - use exact case.
- false - do not use exact case.
- optional - Comparison will be optional in ECLScreenReco
- See Also:
- AddString, AddString
AddStringInRect
public synchronized void AddStringInRect(String text,
int startRow,
int startCol,
int endRow,
int endCol)
- Adds a string to the screen description. This method will add
a string that can exist in a rectangular area.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- text - String to add.
- startRow - Starting row for location type.
- startCol - Starting column for location type.
- endRow - Ending row for IN_RECT location type.
- endCol - Ending column for IN_RECT location type.
- See Also:
- AddStringInRect
AddStringInRect
public synchronized void AddStringInRect(String text,
int startRow,
int startCol,
int endRow,
int endCol,
boolean caseSensitive)
- Adds a string to the screen description. This method will add
a string that can exist in a rectangular area, allowing you
to specify case sensitivity.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- text - String to add
- startRow - Starting row for location.
- startCol - Starting column for location type.
- endRow - Ending row for IN_RECT location type.
- endCol - Ending column for IN_RECT location type.
- caseSensitive - Indicates whether exact case should be used.
- true - use exact case.
- false - do not use exact case.
- See Also:
- AddStringInRect
AddStringInRect
public synchronized void AddStringInRect(String text,
int startRow,
int startCol,
int endRow,
int endCol,
boolean caseSensitive,
boolean optional)
- Adds a string to the screen description. This method will add
a string that can exist in a rectangular area, allowing you
to specify case sensitivity.
NOTE:
Because the ECLScreenDesc object has no explicit relationship with a
single Presentation Space, and Presentation Spaces vary with respect
to size, the row and column parameters are not validated in this
method. They are validated in the IsMatch method of ECLScreenReco,
where a specific PS is passed and validation is possible.
- Parameters:
- text - String to add
- startRow - Starting row for location.
- startCol - Starting column for location type.
- endRow - Ending row for IN_RECT location type.
- endCol - Ending column for IN_RECT location type.
- caseSensitive - Indicates whether exact case should be used.
- true - use exact case.
- false - do not use exact case.
- optional - Comparison will be optional in ECLScreenReco
- See Also:
- AddStringInRect
SetCustomListener
public synchronized void SetCustomListener(ECLCustomRecoListener listener,
String id)
- Registers a custom recognition listener with a given ID. Custom recognition
listeners can extend the basic ECLScreenDesc recognition functionality.
This is different from the AddCustom methods because it doesn't add
a descriptor to the ECLScreenDesc object, it just registers a listener.
- Parameters:
- listener - listener that is called for recognition
- ID - unique identifier for recognition
- See Also:
- ECLCustomRecoListener, ECLCustomRecoEvent
AddCustom
public synchronized void AddCustom(ECLCustomRecoListener listener,
String id)
- Adds a custom recognition listener with a given ID. Custom recognition
listeners can extend the basic ECLScreenDesc recognition functionality.
- Parameters:
- listener - listener that is called for recognition
- ID - unique identifier for recognition
- See Also:
- ECLCustomRecoListener, ECLCustomRecoEvent
AddCustom
public synchronized void AddCustom(ECLCustomRecoListener listener,
String id,
boolean optional)
- Adds a custom recognition listener with a given ID. Custom recognition
listeners can extend the basic ECLScreenDesc recognition functionality.
- Parameters:
- listener - listener that is called for recognition
- ID - unique identifier for recognition
- optional - Comparison will be optional in ECLScreenReco
- See Also:
- ECLCustomRecoListener, ECLCustomRecoEvent
AddDescriptor
public synchronized void AddDescriptor(ECLScreenDescriptor desctor)
- Adds a descriptor to the screen description.
A descriptor represents one unique description item in ECLScreenDesc.
These descriptors can be items like strings, cursor position, field
count, and the like. Each of these types of descriptors has its own
class that is derived from ECLScreenDescriptor.
If the type of descriptor is unknown, this method will just return
without adding anything.
- See Also:
- ECLScreenDescriptor
RemoveDescriptor
public synchronized void RemoveDescriptor(ECLScreenDescriptor desctor)
- Removes a descriptor from the screen description.
A descriptor represents one unique description item in ECLScreenDesc.
These descriptors can be items like strings, cursor position, field
count, and the like. Each of these types of descriptors has its own
class that is derived from ECLScreenDescriptor.
- See Also:
- ECLScreenDescriptor
GetDescriptors
public synchronized Vector GetDescriptors()
- Returns the descriptor collection object for the ECLScreenDesc class.
- Returns:
- collection of screen descriptors
- See Also:
- ECLScreenDescriptor
SetDescriptors
public synchronized void SetDescriptors(Vector desctors)
- Sets the descriptor collection object for the ECLScreenDesc class.
- Parameters:
- desctors - descriptor collection to set
- See Also:
- ECLScreenDescriptor
GetSDCursor
public synchronized ECLSDCursor GetSDCursor()
- Returns the cursor screen descriptor for the ECLScreenDesc object.
There is only one cursor descriptor.
- Returns:
- cursor screen descriptor
GetSDFields
public synchronized ECLSDFields GetSDFields()
- Returns the field count screen descriptor for the ECLScreenDesc object.
There is only one field count descriptor.
- Returns:
- field count screen descriptor
GetSDInputFields
public synchronized ECLSDInputFields GetSDInputFields()
- Returns the input field count screen descriptor for the ECLScreenDesc object.
There is only one input field count descriptor.
- Returns:
- input field count screen descriptor
GetSDOIA
public synchronized ECLSDOIA GetSDOIA()
- Returns the OIA state screen descriptor for the ECLScreenDesc object.
There is only one OIA state descriptor.
- Returns:
- field count screen descriptor
GetSDAttribs
public synchronized Vector GetSDAttribs()
- Returns a collection of the attribute screen descriptors for the
ECLScreenDesc object.
- Returns:
- vector of attribute screen descriptors
GetSDStrings
public synchronized Vector GetSDStrings()
- Returns a collection of the string screen descriptors for the
ECLScreenDesc object.
- Returns:
- vector of string screen descriptors
GetSDCustom
public synchronized Vector GetSDCustom()
- Returns a collection of the custom screen descriptors for the
ECLScreenDesc object.
- Returns:
- vector of custom screen descriptors
GetSDCustom
public synchronized ECLSDCustom GetSDCustom(String id)
- Returns the custom recognition screen descriptor for the ECLScreenDesc
object that has the given ID.
- Parameters:
- id - unique identifier of the custom reco descriptor
- Returns:
- custom reco descriptor, null if descriptor with ID not present
Descriptors
public synchronized Enumeration Descriptors()
- Returns an enumeration of all the descriptors for the ECLScreenDesc
object.
- Returns:
- descriptor enumeration
SetName
public void SetName(String argName)
- Sets the unique name for the screen description. Use it for identification
purposes
- Parameters:
- argName - name of description
GetName
public String GetName()
- Returns unique name for the screen description. Use it for identification
purposes
- Returns:
- name of description
SetTransient
public void SetTransient(boolean argVal)
- Sets the screen description as transient. The ECLScreenReco.IsMatch
logic will compare transient screens against the PS last. The transient
property should be used to designate screens as less important than
non-transient screens. This is useful for unwanted screens that might
appear in your host screen application flow, which you usually want
to just clear. Setting descriptions of screens like these as transient
will make it so ECLScreenReco compares an the wanted (non-transient)
screens first. If there isn't a match, the transient screens are compared
and possibly matched. This safeguards against collision between transient
and non-transient screens.
- Parameters:
- argVal - if true, screen will be set to transient
IsTransient
public boolean IsTransient()
- Returns whether the screen description is transient.
- Returns:
- if true, screen will be set to transient
- See Also:
- SetTransient
IsMatch
public boolean IsMatch()
- Returns whether the description matched in the ECLScreenReco
matching algorithm.
- Returns:
- true if matched, false if not matched
SetActive
public void SetActive(boolean active)
- Sets whether the ECLScreenDesc object should be monitored if
it is registered with the ECLScreenReco system.
- Parameters:
- active - If false, ECLScreenReco will not fire reco events.
If true, ECLScreenReco will fire reco events for the
screen.
IsActive
public boolean IsActive()
- Returns whether the ECLScreenDesc object should be monitored if
it is registered with the ECLScreenReco system.
- Returns:
- state of monitoring process
StringToAttrib
public static char StringToAttrib(String str)
- Converts a hex string (0x00) to a character attribute.
- Parameters:
- str - hex string representation of the char value
- Returns:
- char value to convert to a string
AttribToString
public static String AttribToString(char attrib)
- Converts a character attribute value to a hex string.
- Parameters:
- attrib - char value to convert to a string
- Returns:
- hex string representation of the char value
StringToPlane
public static int StringToPlane(String planeStr)
- Takes a string representation of a plane constant and converts it into a
plane value.
- Parameters:
- planeStr - string representation of the plane (example, TEXT_PLANE)
- Returns:
- integer value of the plane as defined in ECLConstants
PlaneToString
public static String PlaneToString(int plane)
- Takes a plane value and converts it into a string representation of a
plane constant.
- Parameters:
- plane - integer value of the plane as defined in ECLConstants
- Returns:
- string representation of the plane (example, TEXT_PLANE)
All Packages Class Hierarchy This Package Previous Next Index