HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hsr.screen
Class HsrScreen

java.lang.Object
  extended by com.ibm.hsr.screen.HsrScreen
Direct Known Subclasses:
HostScreen

public abstract class HsrScreen
extends Object

The HsrScreen is the bridge between the HSR transformation functions and the other interfaces of the HSR Screen interface. The HsrScreen class is used to contain all of the objects that make up a legacy host screen. For example, an HsrScreen and legacy host screen both contain a collection of fields, as well as attributes of each field, and a cursor. Most of the objects in HsrScreen are interfaces, themselves, such as the fields and field attributes.


Field Summary
protected  int cursorCol
          the cursor column
protected  int cursorPos
          cursor position
protected  int cursorRow
          cursor row
protected  HsrBidiServices hsrBidi
          Bidi information about a host screen if it is Bidi screen
static String PROTECTED_TEXT_ONLY
          An indicator for limiting screen text to the protected text only (versus protected & unprotected)
protected  int screenSize
          screen size
protected  int sizeCols
          # of screen columns
protected  int sizeRows
          # of screen rows
static String VISIBLE_SHIFTLESS_TEXT
          An indicator for limiting screen text to visible text, with no shift-in or shift-out characters if the screen text is from a double-byte character set
static String VISIBLE_TEXT_ONLY
          An indicator for limiting screen text to the visible text only (versus both visible and hidden)
 
Constructor Summary
HsrScreen()
           
 
Method Summary
 char charAt(int cursorPos)
          Returns a screen character from the host screen at the specified cursor position
 char charAt(int cursorPos, String limitingAttrib)
          Returns a screen character from the host screen at the specified cursor position.
 int ConvertPosToCol(int pos)
          Deprecated. - Use CommonScreenFunctions.convertPosToCol(pos, this.getSizeCols()) instead.
 int ConvertPosToRow(int pos)
          Deprecated. - Use CommonScreenFunctions.convertPosToRow(pos, this.getSizeCols()) instead.
 int ConvertRowColToPos(int row, int col)
          Deprecated. - Use CommonScreenFunctions.convertRowColToPos(row, col, this.getSizeCols()) instead.
 int getBackgroundColor(int screenPosition)
          Returns the background color for a character at a specific position on the screen, where the color value ranges from 0-7, as in the IBM Host Access Client Library.
 int getCursorCol()
          Returns the cursor column value.
 int GetCursorCol()
          Deprecated. - Use getCursorCol() instead.
 int getCursorPos()
          Returns the cursor position value.
 int GetCursorPos()
          Deprecated. - Use getCursorPos() instead.
 int getCursorRow()
          Returns the cursor row value.
 int GetCursorRow()
          Deprecated. - Use getCursorRow() instead.
 HsrScreenField getFieldAssociatedWithPos(int pos)
          Retrieves the HsrScreenField at the given location, as in getFieldAtPosition.
 HsrScreenField getFieldAtPos(int pos)
          Retrieves the HsrScreenField at the given location.
 HsrScreenField getFieldAtPos(int row, int col)
          Retrieves the HsrScreenField at the given location
 HsrAttributes getFieldAttributes(int screenPosition)
          Returns the field attributes for a character at a specific position on the screen.
 int getFieldCount()
          Deprecated. - Use getFieldList().getFieldCount() instead.
abstract  IScreenFieldList getFieldList()
          Returns the list of fields contained on the current HsrScreen.
 int getForegroundColor(int screenPosition)
          Returns the foreground color for a character at a specific position on the screen, where the color value ranges from 0-15, as in the IBM Host Access Client Library.
 HsrBidiServices getHsrBidiServices()
          Returns the hsrBidiServices object, if a host screen is Bidirectional.
abstract  byte[] getScreenFingerprint(int position)
          Returns a 12-byte "fingerprint" for the host screen if the screen contains a fingerprint, which is optionally found in IBM 5250 Subfile screens.
 int getScreenRect(char[] buffer, int bufferLength, int startRow, int startCol, int endRow, int endCol, String limitingAttribute)
          Gets a textual area defined by the start/end rows and columns from the host screen.
 int getScreenSize()
          Returns the screen size as an integer representing the total character buffer size of the screen.
 int getScreenText(char[] buffer, int bufferLength)
          Gets a textual area from the host screen.
abstract  int getScreenText(char[] buffer, int bufferLength, int position, int length)
          Gets a textual area from the host screen, starting at a given position.
 int getScreenText(char[] buffer, int bufferLength, int row, int col, int length)
          Gets a textual area from the host screen, starting at a given position.
 int getScreenText(char[] buffer, int bufferLength, int row, int col, int length, String limitingAttribute)
          Gets a textual area from the host screen, starting at a given position.
abstract  int getScreenText(char[] buffer, int bufferLength, int position, int length, String limitingAttribute)
          Gets a textual area from the host screen, starting at a given position.
 int getSize()
          Deprecated. - Use getScreenSize() instead.
 int GetSize()
          Deprecated. - Use getScreenSize() instead.
 int getSizeCols()
          Returns the number of columns for the host screen.
 int GetSizeCols()
          Deprecated. - Use getSizeCols() instead.
 int getSizeRows()
          Returns the number of rows for the host screen.
 int GetSizeRows()
          Deprecated. - Use getSizeRows() instead.
 int getTotalFieldCount()
          Deprecated. - Use getFieldList().getFieldCount() instead.
 boolean is3270()
          Deprecated. - Use is3270Screen() instead.
abstract  boolean is3270Screen()
          Returns if the screen is a 3270 representation.
 boolean is5250()
          Deprecated. - Use is5250Screen() instead.
abstract  boolean is5250Screen()
          Returns if the screen is a 5250 representation.
abstract  boolean isArabic()
          Returns whether the screen is Arabic or not (Arabic codepage).
 boolean isArabicSession()
          Deprecated. - Use isArabic() instead.
abstract  boolean isBidi()
          Returns whether the screen is of a Bidi codepage or not.
 boolean isBIDISession()
          Deprecated. - Use isBidi() instead.
abstract  boolean isDbcsScreen()
          Returns if the screen is a Double-byte character set screen.
 boolean isDBCSSession()
          Deprecated. - Use isDbcsScreen() instead.
 void setCursorCol(int cursorCol)
          Sets cursor column on the host screen.
 void setCursorPos(int cursorPos)
          Sets cursor position on the host screen.
 void setCursorRow(int cursorRow)
          Sets cursor row on the host screen.
 void setHsrBidiServices(HsrBidiServices hsrBidi)
          Sets the HsrBidiServices object that the HsrScreen is to use for Bidirectional processing.
 void setScreenSize(int screenSize)
          Set the screen size of the HsrScreen.
 void setSizeCols(int sizeCols)
          Set the number of columns of the HsrScreen.
 void setSizeRows(int sizeRows)
          Set the number of rows of the HsrScreen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTECTED_TEXT_ONLY

public static String PROTECTED_TEXT_ONLY
An indicator for limiting screen text to the protected text only (versus protected & unprotected)


VISIBLE_SHIFTLESS_TEXT

public static String VISIBLE_SHIFTLESS_TEXT
An indicator for limiting screen text to visible text, with no shift-in or shift-out characters if the screen text is from a double-byte character set


VISIBLE_TEXT_ONLY

public static String VISIBLE_TEXT_ONLY
An indicator for limiting screen text to the visible text only (versus both visible and hidden)


cursorCol

protected int cursorCol
the cursor column


cursorPos

protected int cursorPos
cursor position


cursorRow

protected int cursorRow
cursor row


hsrBidi

protected HsrBidiServices hsrBidi
Bidi information about a host screen if it is Bidi screen


screenSize

protected int screenSize
screen size


sizeCols

protected int sizeCols
# of screen columns


sizeRows

protected int sizeRows
# of screen rows

Constructor Detail

HsrScreen

public HsrScreen()
Method Detail

charAt

public char charAt(int cursorPos)
Returns a screen character from the host screen at the specified cursor position

Parameters:
cursorPos - - position for retrieving the screen character
Returns:
char - the screen character at the specified position

charAt

public char charAt(int cursorPos,
                   String limitingAttrib)
Returns a screen character from the host screen at the specified cursor position.

Parameters:
cursorPos - Position for retrieving the screen character.
limitingAttrib - Limit the screen text, for example, return protected-text only, or visible-text only (such as HsrScreen variable VISIBLE_TEXT_DATA).
Returns:
Screen character.

getBackgroundColor

public int getBackgroundColor(int screenPosition)
Returns the background color for a character at a specific position on the screen, where the color value ranges from 0-7, as in the IBM Host Access Client Library.

Parameters:
screenPosition - - absolute position on the screen of the character for which to retrieve color information
Returns:
- the character background color for a specific screen position as an integer value.

GetCursorCol

public int GetCursorCol()
Deprecated. - Use getCursorCol() instead.

Returns the cursor column value.

Returns:
- cursor column value

getCursorCol

public int getCursorCol()
Returns the cursor column value.

Returns:
- cursor column value

GetCursorPos

public int GetCursorPos()
Deprecated. - Use getCursorPos() instead.

Returns the cursor position value.

Returns:
- cursor position value

getCursorPos

public int getCursorPos()
Returns the cursor position value.

Returns:
- cursor position value

GetCursorRow

public int GetCursorRow()
Deprecated. - Use getCursorRow() instead.

Returns the cursor row value.

Returns:
- cursor row value

getCursorRow

public int getCursorRow()
Returns the cursor row value.

Returns:
- cursor row value

getFieldAssociatedWithPos

public HsrScreenField getFieldAssociatedWithPos(int pos)
Retrieves the HsrScreenField at the given location, as in getFieldAtPosition. However, if a field is not initially found, additional attribute checking is done to find the field nearest to the position and most likely applies.

Parameters:
pos - - the position of the screen to attempt field retrieval
Returns:
HsrScreenField - the HsrScreenField at the specific position or the next most-likely field

getFieldAtPos

public HsrScreenField getFieldAtPos(int pos)
Retrieves the HsrScreenField at the given location.

Parameters:
pos - - the position of the screen
Returns:
HsrScreenField - the HsrScreenField at the location or null if no field is found

getFieldAtPos

public HsrScreenField getFieldAtPos(int row,
                                    int col)
Retrieves the HsrScreenField at the given location

Parameters:
row - - the row of the position
col - - the column of the position
Returns:
HsrScreenField - the HsrScreenField at the location or null if no field is found

getFieldAttributes

public HsrAttributes getFieldAttributes(int screenPosition)
Returns the field attributes for a character at a specific position on the screen.

Parameters:
screenPosition - - absolute position on the screen of the character for which to retrieve attribute information
Returns:
- the attribute object associated with the character, or null if no field attributes are associated.

getTotalFieldCount

public int getTotalFieldCount()
Deprecated. - Use getFieldList().getFieldCount() instead.

Returns the total number of fields on this screen.

Returns:
The number of fields.

getFieldCount

public int getFieldCount()
Deprecated. - Use getFieldList().getFieldCount() instead.

Returns the number of fields in the HostScreen.

Returns:
The number of fields in the HostScreen.

getFieldList

public abstract IScreenFieldList getFieldList()
Returns the list of fields contained on the current HsrScreen.

Returns:
- the screen field list.

getForegroundColor

public int getForegroundColor(int screenPosition)
Returns the foreground color for a character at a specific position on the screen, where the color value ranges from 0-15, as in the IBM Host Access Client Library.

Parameters:
screenPosition - - absolute position on the screen of the character for which to retrieve color information
Returns:
- the character foreground color for a specific screen position as an integer value.

getHsrBidiServices

public HsrBidiServices getHsrBidiServices()
Returns the hsrBidiServices object, if a host screen is Bidirectional.

Returns:
- the hsrBidiServices object if a host screen is Bidirectional, else null

getScreenFingerprint

public abstract byte[] getScreenFingerprint(int position)
Returns a 12-byte "fingerprint" for the host screen if the screen contains a fingerprint, which is optionally found in IBM 5250 Subfile screens. If no fingerprint is found, the value null is returned. NOTE: it is recommended that consumers implementing this function have it always return null, unless they know that they are using screens with fingerprints and understand the fingerprint concept.

Parameters:
position - - position on the host screen to start retrieving the 12-byte fingerprint
Returns:
byte - the 12-byte fingerprint

getScreenRect

public int getScreenRect(char[] buffer,
                         int bufferLength,
                         int startRow,
                         int startCol,
                         int endRow,
                         int endCol,
                         String limitingAttribute)
Gets a textual area defined by the start/end rows and columns from the host screen.

Parameters:
buffer - - the buffer to place text into
bufferLength - - the length of the buffer
startRow - - the row to start from
startCol - - the column to start from
endRow - - the row to end at
endCol - - the column to end at
limitingAttribute - - limit the screen text, for example, return protected-text only, or visible-text only (such as HsrScreen variable VISIBLE_TEXT_DATA)
Returns:
int returnLength - the length of the buffer changes

GetSize

public int GetSize()
Deprecated. - Use getScreenSize() instead.

Returns the size of the host screen as an integer representing the total character buffer size of the screen. For example, an 24x80 screen would have a screen size of 1920.

Returns:
The size of the host screen.

getSize

public int getSize()
Deprecated. - Use getScreenSize() instead.

Returns the size of the host screen as an integer representing the total character buffer size of the screen. For example, an 24x80 screen would have a screen size of 1920.

Returns:
The size of the host screen.

getScreenSize

public int getScreenSize()
Returns the screen size as an integer representing the total character buffer size of the screen. For example, an 24x80 screen would have a screen size of 1920.

Returns:
- screen size as an integer

getScreenText

public int getScreenText(char[] buffer,
                         int bufferLength)
Gets a textual area from the host screen. Length of the area retrieved is determined by the buffer length.

Parameters:
buffer - - the buffer to place text into
bufferLength - - the length of the buffer
Returns:
int returnLength - the length of the buffer changes

getScreenText

public abstract int getScreenText(char[] buffer,
                                  int bufferLength,
                                  int position,
                                  int length)
Gets a textual area from the host screen, starting at a given position. Length of the area retrieved is determined by the parameter "length."

Parameters:
buffer - - the buffer to place text into
bufferLength - - the length of the buffer
position - - the position to start from
length - - the length of data to retrieve
Returns:
int returnLength - the length of the buffer changes

getScreenText

public int getScreenText(char[] buffer,
                         int bufferLength,
                         int row,
                         int col,
                         int length)
Gets a textual area from the host screen, starting at a given position. Length of the area retrieved is determined by the parameter "length."

Parameters:
buffer - - the buffer to place text into
bufferLength - - the length of the buffer
row - - the row to start from
col - - the column to start from
length - - the length of data to retrieve
Returns:
int returnLength - the length of the buffer changes

getScreenText

public int getScreenText(char[] buffer,
                         int bufferLength,
                         int row,
                         int col,
                         int length,
                         String limitingAttribute)
Gets a textual area from the host screen, starting at a given position. Length of the area retrieved is determined by the parameter "length." The type of text returned is limited by the parameter "limitingAttribute."

Parameters:
buffer - - the buffer to place text into
bufferLength - - the length of the buffer
row - - the row to start from
col - - the column to start from
length - - the length of data to retrieve
limitingAttribute - - limit the screen text, for example, return protected-text only, or visible-text only (such as HsrScreen variable VISIBLE_TEXT_DATA)
Returns:
int returnLength - the length of the buffer changes

getScreenText

public abstract int getScreenText(char[] buffer,
                                  int bufferLength,
                                  int position,
                                  int length,
                                  String limitingAttribute)
Gets a textual area from the host screen, starting at a given position. Length of the area retrieved is determined by the parameter "length." The type of text returned is limited by the parameter "limitingAttribute."

Parameters:
buffer - - the buffer to place text into
bufferLength - - the length of the buffer
position - - the position to start from
length - - the length of data to retrieve
limitingAttribute - - limit the screen text, for example, return protected-text only, or visible-text only (such as HsrScreen variable VISIBLE_TEXT_DATA)
Returns:
int returnLength - the length of the buffer changes

GetSizeCols

public int GetSizeCols()
Deprecated. - Use getSizeCols() instead.

Returns the number of columns for the host screen.

Returns:
- number of columns for the host screen

getSizeCols

public int getSizeCols()
Returns the number of columns for the host screen.

Returns:
- number of columns for the host screen

GetSizeRows

public int GetSizeRows()
Deprecated. - Use getSizeRows() instead.

Returns the number of rows for the host screen.

Returns:
- number of rows for the host screen

getSizeRows

public int getSizeRows()
Returns the number of rows for the host screen.

Returns:
- number of rows for the host screen

is3270

public boolean is3270()
Deprecated. - Use is3270Screen() instead.

Returns if the screen is a 3270 representation.

Returns:
- whether the screen is a 3270 representation

is5250

public boolean is5250()
Deprecated. - Use is5250Screen() instead.

Returns if the screen is a 5250 representation.

Returns:
- whether the screen is a 5250 representation

is3270Screen

public abstract boolean is3270Screen()
Returns if the screen is a 3270 representation.

Returns:
- whether the screen is a 3270 representation

is5250Screen

public abstract boolean is5250Screen()
Returns if the screen is a 5250 representation.

Returns:
- whether the screen is a 5250 representation

isArabicSession

public boolean isArabicSession()
Deprecated. - Use isArabic() instead.

Returns whether or not the session is an Arabic session.

Returns:
true if the session is Arabic, false otherwise.

isArabic

public abstract boolean isArabic()
Returns whether the screen is Arabic or not (Arabic codepage).

Returns:
- whether screen is Arabic

isBIDISession

public boolean isBIDISession()
Deprecated. - Use isBidi() instead.

Returns whether or not the session is a bidirectional session.

Returns:
true if the session is bidirectional, false otherwise.

isBidi

public abstract boolean isBidi()
Returns whether the screen is of a Bidi codepage or not.

Returns:
- whether screen codepage is Bidi

isDBCSSession

public boolean isDBCSSession()
Deprecated. - Use isDbcsScreen() instead.

Returns whether or not the session is a DBCS Session.

Returns:
true if the session is DBCS, false otherwise.

isDbcsScreen

public abstract boolean isDbcsScreen()
Returns if the screen is a Double-byte character set screen.

Returns:
- whether screen is of a Double-byte character set

setCursorCol

public void setCursorCol(int cursorCol)
Sets cursor column on the host screen.

Parameters:
cursorCol - - the cursor column value

setCursorPos

public void setCursorPos(int cursorPos)
Sets cursor position on the host screen.

Parameters:
cursorPos - - the cursor position value

setCursorRow

public void setCursorRow(int cursorRow)
Sets cursor row on the host screen.

Parameters:
cursorRow - - the cursorRow to set

setHsrBidiServices

public void setHsrBidiServices(HsrBidiServices hsrBidi)
Sets the HsrBidiServices object that the HsrScreen is to use for Bidirectional processing.

Parameters:
hsrBidi - - The HsrBidiServices object, if a host screen is Bidi.

setScreenSize

public void setScreenSize(int screenSize)
Set the screen size of the HsrScreen.

Parameters:
screenSize - - the screen size

setSizeCols

public void setSizeCols(int sizeCols)
Set the number of columns of the HsrScreen.

Parameters:
sizeCols - - number of total columns

setSizeRows

public void setSizeRows(int sizeRows)
Set the number of rows of the HsrScreen.

Parameters:
sizeRows - - number of total rows

ConvertRowColToPos

public int ConvertRowColToPos(int row,
                              int col)
Deprecated. - Use CommonScreenFunctions.convertRowColToPos(row, col, this.getSizeCols()) instead.

Returns the position based on the row and column.

Parameters:
row - The row of the position
col - The column of the position
Returns:
The position based on the row and column.

ConvertPosToCol

public int ConvertPosToCol(int pos)
Deprecated. - Use CommonScreenFunctions.convertPosToCol(pos, this.getSizeCols()) instead.

Returns the column from the position using the column size of the hostscreen.

Parameters:
pos - The position to query
Returns:
The column of the position.

ConvertPosToRow

public int ConvertPosToRow(int pos)
Deprecated. - Use CommonScreenFunctions.convertPosToRow(pos, this.getSizeCols()) instead.

Returns the row from the position using the column size of the hostscreen.

Parameters:
pos - The position to query
Returns:
The row of the position.

HATS 7.5.1 (201005110649)