All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.ECL.ECLPS

java.lang.Object
   |
   +----com.ibm.eNetwork.ECL.ECLPS

public class ECLPS
extends Object
implements ECLConstants, Observer
ECLPS encapsulates the host presentation space. The presentation space is a virtual screen which contains all the characters and attributes that would be seen on a traditional emulator screen. The presentation space is the primary object for text-based interactions with the host. This class provides methods that manipulate text, perform searches, send keystrokes to the host, and work with the cursor. An instance of ECLPS can be obtained using the GetPS() method on an instance of ECLSession.

The raw presentation space data is maintained in a series of planes which can be accessed by various methods within this class. The text plane contains the actual characters in the presentation space. Most of the methods in ECLPS work exclusively with the text plane.

The remaining planes contain the corresponding attributes for each character in the text plane. The color plane contains color characteristics. The field plane contains the field attributes. The extended field plane contains the extended field attributes. The DBCS plane contains double byte character set (DBCS) character and field attributes. The grid plane contains the DBCS grid information. The color, field, extended field, DBCS, and grid planes are not interpreted by any of the methods in this class.

It may be more convenient to access the presentation space through a field list (ECLFieldList). The GetFieldList() method may be used to get an instance of ECLFieldList which contains a snapshot of all the fields in the current presentation space. Fields provide convenient methods for interpretting the data in the non-text planes.

The only configurable feature of the presentation space is its size. The size is determined by the value of the SESSION_PS_SIZE keyword in the Properties parameter when ECLSession is constructed. Valid presentation space sizes include 24 x 80, 32 x 80, 43 x 80, 27 x 132, and 24 x 132 but might be limited by the type of emulation (3270, 5250, VT). The default size is 24 rows by 80 columns. The size of the presentation space can be determined using the GetSize(), GetSizeRows(), and GetSizeCols() methods.

Once an instance of ECLPS has been obtained, an application can register for PS events using the RegisterPSEvent() method. PS events are sent to registered objects whenever the presentation space is changed for any reason, be it host or operator initiated. These PS events are the primary mechanism used by an application to drive interactions with the presentation space.

See Also:
ECLSession, ECLFieldList, ECLField

Method Index

 o ConvertPosToCol(int)
The ConvertPosToCol method converts a linear presentation space position to its corresponding column.
 o ConvertPosToRow(int)
The ConvertPosToRow method converts a linear presentation space position to its corresponding row.
 o ConvertRowColToPos(int, int)
The ConvertRowColToPos method converts a row and column coordinate to its corresponding linear position.
 o GetCursorCol()
Returns the column coordinate of the current cursor position.
 o GetCursorPos()
Returns the linear cursor position.
 o GetCursorRow()
Returns the row coordinate of the current cursor position.
 o GetFieldList(int)
GetFieldList returns an instance of ECLFieldList based on the current PS.
 o GetScreen(char[], int, int)
GetScreen retrieves the various planes (text, color, attributes, extended attributes) associated with the presentation space.
 o GetScreen(char[], int, int, int, int)
GetScreen retrieves the various planes (text, color, attributes, extended attributes) associated with the presentation space.
 o GetScreen(char[], int, int, int, int, int)
GetScreen retrieves the various planes (text, color, attributes, extended attributes) associated with the presentation space.
 o GetScreenRect(char[], int, int, int, int)
GetScreenRect retrieves data from the various planes (text, color, attributes, extended attributes) associated with the presentation space.
 o GetScreenRect(char[], int, int, int, int, int, int)
GetScreenRect retrieves data from the various planes (text, color, attributes, extended attributes) associated with the presentation space.
 o GetSize()
Returns the linear size of the presentation space.
 o GetSizeCols()
Returns the total number of columns in the presentation space.
 o GetSizeRows()
Returns the total number of rows in the presentation space.
 o GetString(char[], int)
GetString retrieves text plane information from the presentation space similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently.
 o GetString(char[], int, int, int)
GetString retrieves text plane information from the presentation space similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently.
 o GetString(char[], int, int, int, int)
GetString retrieves text plane information from the presentation space similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently.
 o RegisterPSEvent(ECLPSNotify)
Registers a notification object for events dispatched by a single instance of ECLPS.
 o SearchString(String, int)
The SearchString method searches for a given text string within the presentation space similarly to SearchText, but it handles DBCS characters differently.
 o SearchString(String, int, int)
The SearchString method searches for a given text string within the presentation space similarly to SearchText, but it handles DBCS characters differently.
 o SearchString(String, int, int, int)
The SearchString method searches for a given text string within the presentation space similarly to SearchText, but it handles DBCS characters differently.
 o SearchText(String, int)
The SearchText method searches for a given text string within the presentation space.
 o SearchText(String, int, int)
The SearchText method searches for a given text string within the presentation space.
 o SearchText(String, int, int, int)
The SearchText method searches for a given text string within the presentation space.
 o SendKeys(String)
The SendKeys method sends a string of keys to the presentation space.
 o SendKeys(String, int)
This signature of SendKeys sends the given text string at the specified cursor location.
 o SendKeys(String, int, int)
This signature of SendKeys sends the given text string at the specified cursor position.
 o SetCursorPos(int)
Sets the cursor position to the specified linear position.
 o SetCursorPos(int, int)
Sets cursor position to the specified row and column.
 o SetNumFieldCheckMode(boolean)
Method called to set Num lock field checking flag.
 o SetString(String)
The SetString method sends a string to the presentation space at the current cursor location similarly to SetText, but it handles DBCS characters differently.
 o SetString(String, int)
The SetString method sends a string to the presentation space at the specified location similarly to SetText, but it handles DBCS characters differently.
 o SetString(String, int, int)
The SetString method sends a string to the presentation space at the specified location similarly to SetText, but it handles DBCS characters differently.
 o SetText(String)
The SetText method sends a string to the presentation space at the current cursor location.
 o SetText(String, int)
The SetText method sends a string to the presentation space at the specified location.
 o SetText(String, int, int)
The SetText method sends a string to the presentation space at the specified location.
 o UnregisterPSEvent(ECLPSNotify)
Unregisters a notification object previously registered with the RegisterPSEvent() method.
 o update(Observable, Object)

Methods

 o GetSize
 public synchronized int GetSize()
Returns the linear size of the presentation space. The linear size of a presentation space is determined by multiplying the number of rows and columns. For example a 24 x 80 presentation space would have a size of 1920.

Returns:
The linear size of the presentation space.
 o GetSizeRows
 public synchronized int GetSizeRows()
Returns the total number of rows in the presentation space.

Returns:
The number of rows in the presentation space.
See Also:
GetSizeCols
 o GetSizeCols
 public synchronized int GetSizeCols()
Returns the total number of columns in the presentation space.

Returns:
The number of columns in the presentation space.
See Also:
GetSizeRows
 o GetCursorPos
 public synchronized int GetCursorPos()
Returns the linear cursor position. The linear cursor position is determined by assuming the presentation space is mapped to a one-dimensional array. Two-dimensional array coordinates can be mapped to a one-dimensional array using the following formula: (y - 1) * numCol + x. So the linear position of a cursor at 10, 15 on a 24 x 80 presentation space would be 9*80+15=735.

Note: The cursor positioning system is 1-based rather than 0-based. The valid cursor positions for a 24 x 80 presentation space are between 1 and 1920 inclusive.

Returns:
The linear cursor position.
 o GetCursorRow
 public synchronized int GetCursorRow()
Returns the row coordinate of the current cursor position.

Note: The cursor positioning system is 1-based rather than 0-based. The valid cursor row positions for a 24 x 80 presentation space are between 1 and 24 inclusive.

Returns:
The row coordinate of the current cursor position.
See Also:
GetCursorCol
 o GetCursorCol
 public synchronized int GetCursorCol()
Returns the column coordinate of the current cursor position.

Note: The cursor positioning system is 1-based rather than 0-based. The valid cursor column positions for a 24 x 80 presentation space are between 1 and 80 inclusive.

Returns:
The column coordinate of the current cursor position.
See Also:
GetCursorRow
 o SetCursorPos
 public synchronized void SetCursorPos(int pos) throws ECLErr
Sets the cursor position to the specified linear position.

Parameters:
pos - The new linear cursor position. This number must be between 1 and the size of the presentation space inclusive.
Throws: ECLErr
Thrown when the given position is out of range.
See Also:
SetCursorPos
 o SetCursorPos
 public synchronized void SetCursorPos(int row,
                                       int col) throws ECLErr
Sets cursor position to the specified row and column.

Parameters:
row - The new row coordinate of the cursor position. This number must be between 1 and the number of rows in the presentation space inclusive.
column - The new column coordinate of the cursor position. This number must be between 1 and the number of columns in the presentation space inclusive.
Throws: ECLErr
Thrown when the coordinates given are out of range.
See Also:
SetCursorPos
 o SendKeys
 public synchronized void SendKeys(String text) throws ECLErr
The SendKeys method sends a string of keys to the presentation space. The string can be thought of as keystrokes from the keyboard which can contain both text characters and special keystrokes, like the Enter key, the Tab key, or the Page Up key. These special keys are represented by keywords which are delimited by square brackets and called mnemonics. For example, the mnemonic keyword for the Enter key is [enter].

The text string can contain any number or combination of characters and mnemonics. For example, the following string, "userID[tab]password[enter]", can be used to send a user's ID, tab to the next field, send the user's password, and then send the Enter key to logon to a host.

To send a left or right square bracket, the character must be doubled. To send a left square bracket use "[[". To send a right square bracket use "]]".

This signature of SendKeys sends the given text string at the current cursor location.

Parameters:
text - The string of characters and aid key mnemonics to be sent.
See Also:
SendKeys, SendKeys
 o SendKeys
 public synchronized void SendKeys(String text,
                                   int pos) throws ECLErr
This signature of SendKeys sends the given text string at the specified cursor location. The cursor is moved to the given location before the text string is sent.

Parameters:
text - The string of characters and mnemonic keywords to be sent.
pos - The linear position where keys should be sent.
Throws: ECLErr
Thrown if the position specified is out of range.
See Also:
SendKeys, SendKeys
 o SendKeys
 public synchronized void SendKeys(String text,
                                   int row,
                                   int col) throws ECLErr
This signature of SendKeys sends the given text string at the specified cursor position. The cursor is moved to the given coordinates before the text string is sent.

Parameters:
text - The string of characters and mnemonic keywords to be sent.
row - The starting row where keys should be sent.
column - The starting column where keys should be sent.
Throws: ECLErr
Thrown if the position specified is out of range.
See Also:
SendKeys, SendKeys
 o SearchText
 public synchronized int SearchText(String text,
                                    int direction)
The SearchText method searches for a given text string within the presentation space. The method allows both forward and backward searches. If a forward search is specified, the search starts at the beginning of the presentation space. If a backward search is specified, the search starts at the end of the presentation space.

The method returns the linear position of the found string or zero if the string is not found. The linear position can be converted to row and column coordinates using the ConvertPosToRow() and ConvertPosToCol() methods.

Parameters:
text - The string to search for.
direction - Specifies whether to search forward or backward from the starting location of the search. To search forward use the SEARCH_FORWARD constant. To search backward use the SEARCH_BACKWARD constant.
Returns:
The linear position of the given string, or zero if not found.
See Also:
SearchText, SearchText, ConvertPosToRow, ConvertPosToCol
 o SearchString
 public synchronized int SearchString(String text,
                                      int direction)
The SearchString method searches for a given text string within the presentation space similarly to SearchText, but it handles DBCS characters differently. While SearchText searches for the exact string specified, SearchString automatically duplicates DBCS characters in the search string before attempting the search.

The method allows both forward and backward searches. If a forward search is specified, the search starts at the beginning of the presentation space. If a backward search is specified, the search starts at the end of the presentation space.

The method returns the linear position of the found string or zero if the string is not found. The linear position can be converted to row and column coordinates using the ConvertPosToRow() and ConvertPosToCol() methods.

Note: SearchString functions identically to SearchText when the given search string contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - The string to search for.
direction - Specifies whether to search forward or backward from the starting location of the search. To search forward use the SEARCH_FORWARD constant. To search backward use the SEARCH_BACKWARD constant.
Returns:
The linear position of the given string, or zero if not found.
See Also:
SearchString, SearchString, ConvertPosToRow, ConvertPosToCol
 o SearchText
 public synchronized int SearchText(String text,
                                    int row,
                                    int column,
                                    int direction) throws ECLErr
The SearchText method searches for a given text string within the presentation space. The method allows both forward and backward searches. If a forward search is specified, the search begins at the given coordinates (inclusive) and ends at the end of the presentation space. If a backward search is specified, the search begins at the given coordinates (inclusive) and ends at the beginning of the presentation space.

The method returns the linear position of the found string or zero if the string is not found. The linear position can be converted to row and column coordinates using the ConvertPosToRow() and ConvertPosToCol() methods.

Parameters:
text - The string to search for.
row - Starting row.
column - Starting column.
direction - Specifies whether to search forward or backward from the starting location of the search. To search forward use the SEARCH_FORWARD constant. To search backward use the SEARCH_BACKWARD constant.
Returns:
The linear position of the given string, or zero if not found.
Throws: ECLErr
Thrown if the position specified is out of range.
See Also:
SearchText, SearchText, ConvertPosToRow, ConvertPosToCol
 o SearchString
 public synchronized int SearchString(String text,
                                      int row,
                                      int column,
                                      int direction) throws ECLErr
The SearchString method searches for a given text string within the presentation space similarly to SearchText, but it handles DBCS characters differently. While SearchText searches for the exact string specified, SearchString automatically duplicates DBCS characters in the search string before attempting the search.

The method allows both forward and backward searches. If a forward search is specified, the search begins at the given coordinates (inclusive) and ends at the end of the presentation space. If a backward search is specified, the search begins at the given coordinates (inclusive) and ends at the beginning of the presentation space.

The method returns the linear position of the found string or zero if the string is not found. The linear position can be converted to row and column coordinates using the ConvertPosToRow() and ConvertPosToCol() methods.

Note: SearchString functions identically to SearchText when the given search string contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - The string to search for.
row - Starting row.
column - Starting column.
direction - Specifies whether to search forward or backward from the starting location of the search. To search forward use the SEARCH_FORWARD constant. To search backward use the SEARCH_BACKWARD constant.
Returns:
The linear position of the given string, or zero if not found.
Throws: ECLErr
Thrown if the position specified is out of range.
See Also:
SearchString, SearchString, ConvertPosToRow, ConvertPosToCol
 o SearchText
 public synchronized int SearchText(String text,
                                    int position,
                                    int direction)
The SearchText method searches for a given text string within the presentation space. The method allows both forward and backward searches. If a forward search is specified, the search begins at the given linear position (inclusive) and ends at the end of the presentation space. If a backward search is specified, the search begins at the given linear position (inclusive) and ends at the beginning of the presentation space.

The method returns the linear position of the found string or zero if the string is not found. The linear position can be converted to row and column coordinates using the ConvertPosToRow() and ConvertPosToCol() methods.

Parameters:
text - The string to search for.
position - Starting linear position.
direction - Specifies whether to search forward or backward from the starting location of the search. To search forward use the SEARCH_FORWARD constant. To search backward use the SEARCH_BACKWARD constant.
Returns:
The linear position of the given string, or zero if not found.
See Also:
SearchText, SearchText, ConvertPosToRow, ConvertPosToCol
 o SearchString
 public synchronized int SearchString(String text,
                                      int position,
                                      int direction)
The SearchString method searches for a given text string within the presentation space similarly to SearchText, but it handles DBCS characters differently. While SearchText searches for the exact string specified, SearchString automatically duplicates DBCS characters in the search string before attempting the search.

The method allows both forward and backward searches. If a forward search is specified, the search begins at the given linear position (inclusive) and ends at the end of the presentation space. If a backward search is specified, the search begins at the given linear position (inclusive) and ends at the beginning of the presentation space.

The method returns the linear position of the found string or zero if the string is not found. The linear position can be converted to row and column coordinates using the ConvertPosToRow() and ConvertPosToCol() methods.

Note: SearchString functions identically to SearchText when the given search string contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - The string to search for.
position - Starting linear position.
direction - Specifies whether to search forward or backward from the starting location of the search. To search forward use the SEARCH_FORWARD constant. To search backward use the SEARCH_BACKWARD constant.
Returns:
The linear position of the given string, or zero if not found.
See Also:
SearchString, SearchString, ConvertPosToRow, ConvertPosToCol
 o GetScreen
 public synchronized int GetScreen(char buffer[],
                                   int bufferLength,
                                   int plane) throws ECLErr
GetScreen retrieves the various planes (text, color, attributes, extended attributes) associated with the presentation space. The data is returned as a linear array of character values in the array provided. The array is not terminated by a null character except when data is retrieved from the text plane, in which case a single null character is appended.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the beginning of the presentation space and continuing until the buffer is full or the entire plane has been copied. For text plane data, the buffer must include one extra position for the terminating null character.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
plane - The plane to return. The valid values follow:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
Returns:
The number of characters copied to the buffer, not including the terminating null for text plane data.
Throws: ECLErr
Thrown if the buffer parameter is null or if the plane parameter is incorrect.
See Also:
GetScreen, GetScreen
 o GetString
 public synchronized int GetString(char buffer[],
                                   int bufferLength) throws ECLErr
GetString retrieves text plane information from the presentation space similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently. While GetScreen returns the raw text plane data, GetString removes duplicate DBCS characters before the text plane data is returned.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the beginning of the presentation space and continuing until the buffer is full or the entire text plane has been copied. The buffer must include one extra position for the addition of a terminating null character.

Note: GetString functions identically to GetScreen(char[], int, TEXT_PLANE) when the text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
Returns:
The number of characters copied to the buffer, not including the terminating null.
Throws: ECLErr
Thrown if the buffer parameter is null.
See Also:
GetString, GetString
 o GetScreen
 public synchronized int GetScreen(char buffer[],
                                   int bufferLength,
                                   int row,
                                   int col,
                                   int length,
                                   int plane) throws ECLErr
GetScreen retrieves the various planes (text, color, attributes, extended attributes) associated with the presentation space. The data is returned as a linear array of character values in the array provided. The array is not terminated by a null character except when data is retrieved from the text plane, in which case a single null character is appended.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the given coordinates and continuing until the specified number of characters have been copied, the buffer is full, or the entire plane has been copied. For text plane data, the buffer must include one extra position for the terminating null character.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
row - The starting row.
colum - The starting column.
length - The number of characters to copy.
plane - The plane to return. The valid values follow:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
Returns:
The number of characters copied to the buffer, not including the terminating null for text plane data.
Throws: ECLErr
Thrown if the buffer parameter is null, if the plane parameter is incorrect, or if the position given is out of range.
See Also:
GetScreen, GetScreen
 o GetString
 public synchronized int GetString(char buffer[],
                                   int bufferLength,
                                   int row,
                                   int col,
                                   int length) throws ECLErr
GetString retrieves text plane information from the presentation space similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently. While GetScreen returns the raw text plane data, GetString removes duplicate DBCS characters before the text plane data is returned.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the given coordinates and continuing until the specified number of characters have been copied, the buffer is full, or the entire text plane has been copied. The buffer must include one extra position for the addition of a terminating null character.

Note: GetString functions identically to GetScreen(char[], int, int, int, int, TEXT_PLANE) when the text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
row - The starting row.
colum - The starting column.
length - The number of characters to copy.
Returns:
The number of characters copied to the buffer, not including the terminating null.
Throws: ECLErr
Thrown if the buffer parameter is null or if the position given is out of range.
See Also:
GetString, GetString
 o GetScreen
 public synchronized int GetScreen(char buffer[],
                                   int bufferLength,
                                   int position,
                                   int length,
                                   int plane) throws ECLErr
GetScreen retrieves the various planes (text, color, attributes, extended attributes) associated with the presentation space. The data is returned as a linear array of character values in the array provided. The array is not terminated by a null character except when data is retrieved from the text plane, in which case a single null character is appended.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the given position and continuing until the specified number of characters have been copied, the buffer is full or the entire plane has been copied. For text plane data, the buffer must include one extra position for the terminating null character.

Parameters:
buffer - An array of characters which contains the returned data.
bufferLength - The length of the buffer.
position - The starting position.
length - The number of characters to copy.
plane - The plane to return. The valid values follow:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
Returns:
The number of characters copied to the buffer, not including the terminating null for text plane data.
Throws: ECLErr
Thrown if the buffer parameter is null, if the plane parameter is incorrect, or if the position given is out of range.
See Also:
GetScreen, GetScreen
 o GetString
 public synchronized int GetString(char buffer[],
                                   int bufferLength,
                                   int position,
                                   int length) throws ECLErr
GetString retrieves text plane information from the presentation space similarly to GetScreen using the TEXT_PLANE parameter, but it handles DBCS characters differently. While GetScreen returns the raw text plane data, GetString removes duplicate DBCS characters before the text plane data is returned.

The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the given coordinates and continuing until the specified number of characters have been copied, the buffer is full, or the entire text plane has been copied. The buffer must include one extra position for the addition of a terminating null character.

Note: GetString functions identically to GetScreen(char[], int, int, int, TEXT_PLANE) when the text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
position - The starting position.
length - The number of characters to copy.
Returns:
The number of characters copied to the buffer, not including the terminating null.
Throws: ECLErr
Thrown if the buffer parameter is null or if the position given is out of range.
See Also:
GetString, GetString
 o GetScreenRect
 public synchronized int GetScreenRect(char buffer[],
                                       int bufferLength,
                                       int startPos,
                                       int endPos,
                                       int plane) throws ECLErr
GetScreenRect retrieves data from the various planes (text, color, attributes, extended attributes) associated with the presentation space. The data is returned as a linear array of character values in the buffer provided.

The application supplies two positions that represent opposing corners of a rectangle within the presentation space. The starting and ending positions can have any spatial relationship to each other. The data returned starts from the row containing the upper-most point to the row containing the lower-most point, and from the left-most column to the right-most column.

The specified buffer must be at least large enough to contain the number of characters in the rectangle. If the buffer is too small, no data is copied and zero is returned by the method. Otherwise, the method returns the number of characters copied.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
startPos - One corner of the rectangle.
endPos - The opposite corner of the rectangle.
plane - The plane to return. The valid values follow:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
Returns:
The number of characters copied to the buffer.
Throws: ECLErr
Thrown if the buffer parameter is null, if the plane parameter is incorrect or if either of the positions specified is not within the plane.
See Also:
GetScreenRect
 o GetScreenRect
 public synchronized int GetScreenRect(char buffer[],
                                       int bufferLength,
                                       int startRow,
                                       int startCol,
                                       int endRow,
                                       int endCol,
                                       int plane) throws ECLErr
GetScreenRect retrieves data from the various planes (text, color, attributes, extended attributes) associated with the presentation space. The data is returned as a linear array of character values in the buffer provided. The buffer is not terminated by a null character.

The application supplies two coordinates that represent opposing corners of a rectangle within the presentation space. The starting and ending coordinates can have any spatial relationship to each other. The data returned starts from the row containing the upper-most point to the row containing the lower-most point, and from the left-most column to the right-most column.

The specified buffer must be at least large enough to contain the number of characters in the rectangle. If the buffer is too small, no data is copied and zero is returned by the method. Otherwise, the method returns the number of characters copied.

Parameters:
buffer - An array of characters that contains the returned data.
bufferLength - The length of the buffer.
startRow - Starting row of the rectangle.
startCol - Starting column of the rectangle.
endRow - Ending row of the rectangle.
endCol - Ending column of the rectangle.
plane - The plane to return. The valid values follow:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
Returns:
The number of characters copied to the buffer.
Throws: ECLErr
Thrown if the buffer parameter is null, if the plane parameter is incorrect or if either of the positions specified is not within the plane.
See Also:
GetScreenRect
 o SetText
 public synchronized void SetText(String text) throws ECLErr
The SetText method sends a string to the presentation space at the current cursor location. The string will overlay only unprotected fields, and any parts of the string which fall over protected fields will be discarded.

Parameters:
text - String to place in the presentation space.
Throws: ECLErr
Thrown if no field is found at the current cursor location.
See Also:
SetText, SetText
 o SetString
 public synchronized void SetString(String text) throws ECLErr
The SetString method sends a string to the presentation space at the current cursor location similarly to SetText, but it handles DBCS characters differently. While SetText copies the given string directly to the presentation space, SetString automatically duplicates DBCS characters before copying the string to the presentation space.

The modified string will overlay only unprotected fields, and any parts of the string which fall over protected fields will be discarded.

Note: SetString functions identically to SetText when the text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - String to place in the presentation space.
Throws: ECLErr
Thrown if no field is found at the current cursor location.
See Also:
SetString, SetString
 o SetText
 public synchronized void SetText(String text,
                                  int pos) throws ECLErr
The SetText method sends a string to the presentation space at the specified location. The string will overlay only unprotected fields, and any parts of the string which fall over protected fields will be discarded.

Parameters:
text - String to place in the presentation space.
pos - Linear position where the string should be written.
Throws: ECLErr
Thrown if the position is not valid.
See Also:
SetText, SetText
 o SetString
 public synchronized void SetString(String text,
                                    int pos) throws ECLErr
The SetString method sends a string to the presentation space at the specified location similarly to SetText, but it handles DBCS characters differently. While SetText copies the given string directly to the presentation space, SetString automatically duplicates DBCS characters before copying the string to the presentation space.

The modified string will overlay only unprotected fields, and any parts of the string which fall over protected fields will be discarded.

Note: SetString functions identically to SetText when the text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - String to place in the presentation space.
pos - Linear position where the string should be written.
Throws: ECLErr
Thrown if the position is not valid.
See Also:
SetString, SetString
 o SetText
 public synchronized void SetText(String text,
                                  int row,
                                  int column) throws ECLErr
The SetText method sends a string to the presentation space at the specified location. The string will overlay only unprotected fields, and any parts of the string which fall over protected fields will be discarded.

Parameters:
text - String to place in the presentation space.
row - Starting row where the string should be written.
column - Starting column where the string should be written.
Throws: ECLErr
Thrown if coordinates are not valid.
See Also:
SetText, SetText
 o SetString
 public synchronized void SetString(String text,
                                    int row,
                                    int column) throws ECLErr
The SetString method sends a string to the presentation space at the specified location similarly to SetText, but it handles DBCS characters differently. While SetText copies the given string directly to the presentation space, SetString automatically duplicates DBCS characters before copying the string to the presentation space.

The modified string will overlay only unprotected fields, and any parts of the string which fall over protected fields will be discarded.

Note: SetString functions identically to SetText when the text plane contains no DBCS characters.

See Text Plane in Appendix B. Host Access Class Library Planes -- Format and Content for more information on the representation of DBCS characters in the text plane.

Parameters:
text - String to place in the presentation space.
row - Starting row where the string should be written.
column - Starting column where the string should be written.
Throws: ECLErr
Thrown if coordinates are not valid.
See Also:
SetString, SetString
 o ConvertPosToRow
 public synchronized int ConvertPosToRow(int pos) throws ECLErr
The ConvertPosToRow method converts a linear presentation space position to its corresponding row.

Parameters:
pos - The position to be converted.
Returns:
The row which corresponds to the position given.
Throws: ECLErr
Thrown if the position is not greater than 0 and less than the presentation space size.
See Also:
ConvertPosToCol, ConvertRowColToPos
 o ConvertPosToCol
 public synchronized int ConvertPosToCol(int pos) throws ECLErr
The ConvertPosToCol method converts a linear presentation space position to its corresponding column.

Parameters:
pos - The position to be converted.
Returns:
The column which corresponds to the position given.
Throws: ECLErr
Thrown if the position is not greater than 0 and less than the presentation space size.
See Also:
ConvertPosToRow, ConvertRowColToPos
 o ConvertRowColToPos
 public synchronized int ConvertRowColToPos(int row,
                                            int col) throws ECLErr
The ConvertRowColToPos method converts a row and column coordinate to its corresponding linear position.

Parameters:
row - The row of the coordinate.
column - The column of the coordinate.
Returns:
The linear position which corresponds to the coordinate given.
Throws: ECLErr
Thrown if the coordinates are not within the presentation space boundaries.
See Also:
ConvertPosToRow, ConvertPosToCol
 o RegisterPSEvent
 public void RegisterPSEvent(ECLPSNotify notify) throws ECLErr
Registers a notification object for events dispatched by a single instance of ECLPS. The notification object must implement the ECLPSNotify interface which defines three callback methods which will be called by the ECLPS class under different conditions.

ECLPSNotify objects can be unregistered using the UnregisterPSEvent() method.

Parameters:
notify - ECLPSNotify object which is notified when events occur.
Throws: ECLErr
Thrown if the notify parameter is null.
See Also:
UnregisterPSEvent, ECLPSNotify
 o UnregisterPSEvent
 public void UnregisterPSEvent(ECLPSNotify notify)
Unregisters a notification object previously registered with the RegisterPSEvent() method. If the notification object is not currently registered, this method does nothing.

Parameters:
notify - ECLPSNotify object which should be unregistered.
See Also:
RegisterPSEvent, ECLPSNotify
 o GetFieldList
 public ECLFieldList GetFieldList(int planes) throws ECLErr
GetFieldList returns an instance of ECLFieldList based on the current PS. A field list contains a collection of the fields in the presentation space. It provides methods which iterate through the fields, find fields based on location, and find fields containing a given string. Each element of the list is an instance of ECLField.

Parameters:
planes - The planes to update. The valid values follow and can be ORed together:
TEXT_PLANE - The character contents of the field. The text plane contains no null or non-displayable characters.
FIELD_PLANE - The field attributes for each field in the plane.
COLOR_PLANE - The color attributes for each character in the plane.
EXFIELD_PLANE - The extended field attributes for each character in the plane.
DBCS_PLANE - The double byte character set (DBCS) character and field attribute data.
GRID_PLANE - The DBCS grid information.
ALL_PLANES - Refreshes all planes.
Throws: ECLErr
Thrown if the planes parameter is not valid.
See Also:
ECLFieldList
 o SetNumFieldCheckMode
 public void SetNumFieldCheckMode(boolean fl)
Method called to set Num lock field checking flag. This is called from SessionGUI class.

 o update
 public void update(Observable o,
                    Object arg)

All Packages  Class Hierarchy  This Package  Previous  Next  Index