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:

  1. All ECLScreenDescriptor-derived objects in an ECLScreenDesc object registered with an ECLScreenReco object that are not optional must pass.
  2. 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

Variable Index

 o DONTCARE
Constant for AddOIAInhibitStatus.
 o NOTINHIBITED
Constant for AddOIAInhibitStatus.

Constructor Index

 o ECLScreenDesc()
Creates an empty instance of ECLScreenDesc.
 o ECLScreenDesc(String)
Creates an instance of ECLScreenDesc from a persistent ECLScreen string.

Method Index

 o AddAttrib(char, int, int, int)
Adds an attribute value to the screen description.
 o AddAttrib(char, int, int, int, boolean)
Adds an attribute value to the screen description.
 o AddCursorPos(int, int)
Sets the cursor position for the screen description.
 o AddCursorPos(int, int, boolean)
Sets the cursor position for the screen description.
 o AddCustom(ECLCustomRecoListener, String)
Adds a custom recognition listener with a given ID.
 o AddCustom(ECLCustomRecoListener, String, boolean)
Adds a custom recognition listener with a given ID.
 o AddDescriptor(ECLScreenDescriptor)
Adds a descriptor to the screen description.
 o AddNumFields(int)
Adds the total field count of a screen to the screen description.
 o AddNumFields(int, boolean)
Adds the total field count of a screen to the screen description.
 o AddNumInputFields(int)
Adds the input field count of a screen to the screen description.
 o AddNumInputFields(int, boolean)
Adds the input field count of a screen to the screen description.
 o AddOIAInhibitStatus(int)
Turns on waiting on OIA inhibit status in the screen description.
 o AddOIAInhibitStatus(int, boolean)
Turns on waiting on OIA inhibit status in the screen description.
 o AddString(String)
Adds a string to the screen description.
 o AddString(String, int, int)
Adds a string starting at the an exact row/col position to the screen description.
 o 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.
 o 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.
 o AddStringInRect(String, int, int, int, int)
Adds a string to the screen description.
 o AddStringInRect(String, int, int, int, int, boolean)
Adds a string to the screen description.
 o AddStringInRect(String, int, int, int, int, boolean, boolean)
Adds a string to the screen description.
 o AttribToString(char)
Converts a character attribute value to a hex string.
 o Clear()
Member method that clears the data in the ECLScreenDesc object.
 o Descriptors()
Returns an enumeration of all the descriptors for the ECLScreenDesc object.
 o GetDescriptors()
Returns the descriptor collection object for the ECLScreenDesc class.
 o GetName()
Returns unique name for the screen description.
 o GetSDAttribs()
Returns a collection of the attribute screen descriptors for the ECLScreenDesc object.
 o GetSDCursor()
Returns the cursor screen descriptor for the ECLScreenDesc object.
 o GetSDCustom()
Returns a collection of the custom screen descriptors for the ECLScreenDesc object.
 o GetSDCustom(String)
Returns the custom recognition screen descriptor for the ECLScreenDesc object that has the given ID.
 o GetSDFields()
Returns the field count screen descriptor for the ECLScreenDesc object.
 o GetSDInputFields()
Returns the input field count screen descriptor for the ECLScreenDesc object.
 o GetSDOIA()
Returns the OIA state screen descriptor for the ECLScreenDesc object.
 o GetSDStrings()
Returns a collection of the string screen descriptors for the ECLScreenDesc object.
 o IsActive()
Returns whether the ECLScreenDesc object should be monitored if it is registered with the ECLScreenReco system.
 o IsMatch()
Returns whether the description matched in the ECLScreenReco matching algorithm.
 o IsTransient()
Returns whether the screen description is transient.
 o PlaneToString(int)
Takes a plane value and converts it into a string representation of a plane constant.
 o RemoveDescriptor(ECLScreenDescriptor)
Removes a descriptor from the screen description.
 o SetActive(boolean)
Sets whether the ECLScreenDesc object should be monitored if it is registered with the ECLScreenReco system.
 o SetCustomListener(ECLCustomRecoListener, String)
Registers a custom recognition listener with a given ID.
 o SetDescriptors(Vector)
Sets the descriptor collection object for the ECLScreenDesc class.
 o SetName(String)
Sets the unique name for the screen description.
 o SetTransient(boolean)
Sets the screen description as transient.
 o StringToAttrib(String)
Converts a hex string (0x00) to a character attribute.
 o StringToPlane(String)
Takes a string representation of a plane constant and converts it into a plane value.
 o toString()
This method is used to serialize an ECLScreenDesc object.

Variables

 o DONTCARE
 public static final int DONTCARE
Constant for AddOIAInhibitStatus. Pass this value to remove OIA monitoring for the screen. The default value is NOTINHIBITED.

 o NOTINHIBITED
 public static final int NOTINHIBITED
Constant for AddOIAInhibitStatus. Pass this value to add OIA monitoring for the screen. This is the default value.

Constructors

 o ECLScreenDesc
 public ECLScreenDesc()
Creates an empty instance of ECLScreenDesc.

 o ECLScreenDesc
 public ECLScreenDesc(String str)
Creates an instance of ECLScreenDesc from a persistent ECLScreen string.

See Also:
toString

Methods

 o 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
 o Clear
 public void Clear()
Member method that clears the data in the ECLScreenDesc object.

 o 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
 o 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
 o 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

 o 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
 o AddNumFields
 public synchronized void AddNumFields(int num)
Adds the total field count of a screen to the screen description.

Parameters:
num - Number of fields.
 o 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
 o AddNumInputFields
 public synchronized void AddNumInputFields(int num)
Adds the input field count of a screen to the screen description.

Parameters:
num - Number of fields.
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o GetDescriptors
 public synchronized Vector GetDescriptors()
Returns the descriptor collection object for the ECLScreenDesc class.

Returns:
collection of screen descriptors
See Also:
ECLScreenDescriptor
 o 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
 o GetSDCursor
 public synchronized ECLSDCursor GetSDCursor()
Returns the cursor screen descriptor for the ECLScreenDesc object. There is only one cursor descriptor.

Returns:
cursor screen descriptor
 o 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
 o 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
 o 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
 o GetSDAttribs
 public synchronized Vector GetSDAttribs()
Returns a collection of the attribute screen descriptors for the ECLScreenDesc object.

Returns:
vector of attribute screen descriptors
 o GetSDStrings
 public synchronized Vector GetSDStrings()
Returns a collection of the string screen descriptors for the ECLScreenDesc object.

Returns:
vector of string screen descriptors
 o GetSDCustom
 public synchronized Vector GetSDCustom()
Returns a collection of the custom screen descriptors for the ECLScreenDesc object.

Returns:
vector of custom screen descriptors
 o 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
 o Descriptors
 public synchronized Enumeration Descriptors()
Returns an enumeration of all the descriptors for the ECLScreenDesc object.

Returns:
descriptor enumeration
 o SetName
 public void SetName(String argName)
Sets the unique name for the screen description. Use it for identification purposes

Parameters:
argName - name of description
 o GetName
 public String GetName()
Returns unique name for the screen description. Use it for identification purposes

Returns:
name of description
 o 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
 o IsTransient
 public boolean IsTransient()
Returns whether the screen description is transient.

Returns:
if true, screen will be set to transient
See Also:
SetTransient
 o IsMatch
 public boolean IsMatch()
Returns whether the description matched in the ECLScreenReco matching algorithm.

Returns:
true if matched, false if not matched
 o 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.
 o 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
 o 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
 o 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
 o 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
 o 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