com.attachmate.cin.interf
Interface IScreenAPI


public interface IScreenAPI

The IScreenAPI interface contains Application Programming Interface (API) methods that enable users to write JavaScript to control and interact with the viewers. When the viewers are embedded in a browser HTML file, HTML form input elements such as input text fields and buttons can be added to the viewer's HTML file. JavaScript functions can then be created that perform some desired action in response to the input elements.

When the viewers are embedded with static configuration properties, users will be able to access these APIs using JavaScript and HTML input elements. For example, a button that clears the viewer screen when it is clicked can be added to the viewer's HTML file. The button can be displayed in the browser with the following HTML:

    <INPUT TYPE=button VALUE="ClearScreen" name=ButtClearScr onclick="clearScreen()">

The clearScreen() function (also added to the viewer's HTML file) will be executed when the button is clicked. This function simply calls the API sendKeys() function to clear the screen:

function clearScreen() {
   document.myAppletID.sendKeys(
              "{ClearPage}",
              document.myAppletID.KEYTYPE_BRACES );
}
Note myAppletID is the value of the "id" or "name" parameter specified in the APPLET tag.

Field Summary
static byte BgBlack
Indicates that the background with this color attribute mask is black.
static byte BgBlue
Indicates that the background with this color attribute mask is blue.
static byte BgCyan
Indicates that the background with this color attribute mask is cyan.
static byte BgDarkBlue
Indicates that the background with this color attribute mask is dark blue.
static byte BgDarkCyan
Indicates that the background with this color attribute mask is dark cyan.
static byte BgDarkGray
Indicates that the background with this color attribute mask is dark gray.
static byte BgDarkGreen
Indicates that the background with this color attribute mask is dark green.
static byte BgDarkMagenta
Indicates that the background with this color attribute mask is dark magenta.
static byte BgDarkRed
Indicates that the background with this color attribute mask is dark red.
static byte BgDarkYellow
Indicates that the background with this color attribute mask is dark yellow.
static byte BgGray
Indicates that the background with this color attribute mask is gray.
static byte BgGreen
Indicates that the background with this color attribute mask is green.
static byte BgMagenta
Indicates that the background with this color attribute mask is magenta.
static byte BgRed
Indicates that the background with this color attribute mask is red.
static byte BgWhite
Indicates that the background with this color attribute mask is white.
static byte BgYellow
Indicates that the background with this color attribute mask is yellow.
static short Blink
Indicates that the character with this attribute mask is blinking in the display.
static short Bold
Indicates that the character with this attribute mask is displayed bold.
static short Bright
Indicates that the character with this attribute mask is bright in the display.
static short Dim
Indicates that the character with this attribute mask is dimmed in the display.
static short DoubleHeight
Indicates that the character with this attribute mask is 2 characters tall on the display.
static short DoubleWidth
Indicates that the character with this attribute mask is 2 characters wide on the display.
static byte FgBlack
Indicates that the character with this color attribute mask is black.
static byte FgBlue
Indicates that the character with this color attribute mask is blue.
static byte FgCyan
Indicates that the character with this color attribute mask is cyan.
static byte FgDarkBlue
Indicates that the character with this color attribute mask is dark blue.
static byte FgDarkCyan
Indicates that the character with this color attribute mask is dark cyan.
static byte FgDarkGray
Indicates that the character with this color attribute mask is dark gray.
static byte FgDarkGreen
Indicates that the character with this color attribute mask is dark green.
static byte FgDarkMagenta
Indicates that the character with this color attribute mask is dark magenta.
static byte FgDarkRed
Indicates that the character with this color attribute mask is dark red.
static byte FgDarkYellow
Indicates that the character with this color attribute mask is dark yellow.
static byte FgGray
Indicates that the character with this color attribute mask is gray.
static byte FgGreen
Indicates that the character with this color attribute mask is green.
static byte FgMagenta
Indicates that the character with this color attribute mask is magenta.
static byte FgRed
Indicates that the character with this color attribute mask is red.
static byte FgWhite
Indicates that the character with this color attribute mask is white.
static byte FgYellow
Indicates that the character with this color attribute mask is yellow.
static int FIELDTYPE_ANY
Specifies that the field type can be either a protected or unprotected field.
static int FIELDTYPE_PROTECTED
Specifies that the field type should be a protected field.
static int FIELDTYPE_UNPROTECTED
Specifies that the field type should be an unprotected field.
static int FINDFIELD_CURRENT
Specifies that the search will begin at the field where the cursor is currently located.
static int FINDFIELD_NEXT
Specifies that the search will begin at the next field from where the cursor currently is located.
static int FINDFIELD_PREVIOUS
Specifies that the search will begin at the previous field from where the cursor is currently located.
static int KEYTYPE_BRACES
Sets the key syntax to Braces style.
static int KEYTYPE_HLLAPI
Sets the key syntax to HLLAPI style.
static short LeftColSep
Indicates that the character with this attribute mask is a left column separator.
static short Normal
Indicates that the character with this attribute mask is normal.
static short Reverse
Indicates that the character with this attribute mask is displayed in reverse video.
static char SCREEN_3270
Specifies the 3270 terminal type returned by getScreenType().
static char SCREEN_5250
Specifies the 5250 terminal type returned by getScreenType().
static char SCREEN_ALC
 
static char SCREEN_T27
Specifies the T27 terminal type returned by getScreenType().
static char SCREEN_UTS
Specifies the UTS terminal type returned by getScreenType().
static char SCREEN_VT
Specifies the VT terminal type returned by getScreenType().
static int SCREENATTR_ANY
Indicates that the presentation space position is either protected or unprotected.
static int SCREENATTR_HIDDEN
Indicates that the presentation space position is not visible.
static int SCREENATTR_PROTECTED
Indicates that the presentation space position is protected.
static int SCREENATTR_UNPROTECTED
Indicates that the presentation space position is unprotected.
static int SCREENATTR_VISIBLE
Indicates that the presentation space position is visible.
static short Secure
Indicates that the character with this attribute mask is secure.
static short Special
Indicates that the character with this attribute mask is special.
static short StrikeThrough
Indicates that the character with this attribute mask has been struck out in the display.
static short Top_Bottom
Indicates that the character with this attribute mask is double width and height on the top and bottom.
static short Underscore
Indicates that the character with this attribute mask is displayed with an underscore.
static short Upper
Indicates that the character with this attribute mask is display in uppercase.
static int WRAP_OFF
Indicates that the search should stop at the end of the screen.
static int WRAP_ON
Indicates that the search should not stop at the end of the screen, but continue from the beginning of the screen and continue forward.
 
Method Summary
 void clearCapturedData()
Clears information from the captured data buffer by setting it to null.
 int fieldCount(int inType)
Returns the number of fields of the specified type.
 boolean findField(int inRow, int inCol, int inMode, int inType, int inWrap)
Searches the screen for the specified field, beginning from the row and column position specified.
 boolean findFieldEx(int beginIndex, int inMode, int inType, int inWrap)
Searches the screen for the specified field, beginning from the index (field number) specified.
 boolean findString(java.lang.String inText, int inStartRow, int inStartColumn)
Searches the screen for the specified text string, starting at the specified position.
 boolean findStringEx(java.lang.String inText, int inStartRow, int inStartColumn, int inEndRow, int inEndColumn, int inArea, int inWrap, int inDir)
Searches the screen for the specified text string, from the specified start position to the specified end position.
 void focusTerminal()
Sets the focus to the terminal.
 java.lang.String getCapturedData()
Returns the currently captured data.
 int getColumns()
Returns the number of columns in the current presentation space (PS).
 boolean getConnectStatus()
Returns the connection status.
 java.awt.Cursor getCursor()
Makes current cursor position available as variables outRow and outColumn.
 int getCursorColumn()
Returns the column of the current cursor position.
 int getCursorRow()
Returns the row of the current cursor position.
 boolean getDataCapture()
Returns the current state of the data capture facility: true if on; false if off.
 java.lang.String getExtPS(int inStartRow, int inStartColumn, int inLength)
Returns the specified portion of the presentation space in a string format.
 boolean getgetText_Display()
Returns the current setting of the getText_Display property.
 boolean getKeyboardLocked()
Returns the current state of the keyboard: true if locked; false if unlocked.
 int getMaxDataCaptureLength()
Returns the current maximum buffer size for data captured using the data capture facility.
 int getObjectVersion()
Returns the version number of the specified AtmApplet object; for example, 3000000 is equivalent to version 3.0.0.
 java.lang.String getOIAContents()
Returns the data displayed in the OIA portion (status line) of the screen.
 java.lang.String getOIAText()
Returns the text of the OIA portion (status line) of the screen in a string format.
 int getRows()
Returns the number of rows in the presentation space (PS).
 int getScreenType()
Returns the current host type.
 java.lang.String getString(int inStartRow, int inStartColumn, int inLength)
Returns the visible text from the specified location.
 java.lang.String getStringEx(int inStartRow, int inStartColumn, int inEndRow, int inEndColumn, int inArea, int inWrap, int inAttr, int inFlags)
Returns text from the specified location, for attributes matching those specified by inAttr.
 java.lang.String getText()
Returns the text contents of the presentation space (PS) as a string.
 void hideTerminal()
The terminal will not display on the screen.
 boolean isKeyboardLocked()
Returns the current state of the keyboard: true if locked; false if unlocked.
 int putString(java.lang.String inText, int inRow, int inColumn)
Copies a string of text to the specified position, returning the number of characters written.
 int putStringEx(java.lang.String inText, int inStartRow, int inStartColumn, int inEndRow, int inEndColumn, int inArea, int inWrap, int inModes, boolean inFill)
Copies a string of text to the specified position, returning the number of characters written.
 int sendKeys(java.lang.String KeysSequence, int iType)
Sends characters and special keys to the host session.
 boolean setCursor(int inRow, int inColumn)
Sets the cursor position on the presentation space (PS).
 boolean setCursorColumn(int inCursorColumn)
Sets the column of the cursor position.
 boolean setCursorRow(int inCursorRow)
Sets the row of the cursor position.
 void setDataCapture(boolean sDCVal)
Turns the data capture facility on or off.
 void setgetText_Display(boolean gtdvalue)
Turns the getText_Display property on or off.
 void setMaxDataCaptureLength(int dcl)
Sets the maximum buffer size for data captured using the data capture facility.
 void showColorDialog()
Displays the color dialog.
 void showTerminal()
The terminal will be displayed.
 boolean waitForCursor(int inRow, int inCol, int wTime)
Waits for the cursor to appear at the specified position, for a specified period of time.
 boolean waitForString(java.lang.String inText, int inRow, int inCol, int wTime)
Waits for the specified text to appear at the specified position, for a specified period of time.
 boolean waitHostQuiet(int sTime, int wTime)
Waits for the host session to be idle for a specified period of time (in milliseconds).
 

Field Detail

> SCREEN_T27

public static final char SCREEN_T27
Specifies the T27 terminal type returned by getScreenType().
See Also:
getScreenType

> SCREEN_UTS

public static final char SCREEN_UTS
Specifies the UTS terminal type returned by getScreenType().
See Also:
getScreenType

> SCREEN_3270

public static final char SCREEN_3270
Specifies the 3270 terminal type returned by getScreenType().
See Also:
getScreenType

> SCREEN_5250

public static final char SCREEN_5250
Specifies the 5250 terminal type returned by getScreenType().
See Also:
getScreenType

> SCREEN_VT

public static final char SCREEN_VT
Specifies the VT terminal type returned by getScreenType().
See Also:
getScreenType

> SCREEN_ALC

public static final char SCREEN_ALC

> Reverse

public static final short Reverse
Indicates that the character with this attribute mask is displayed in reverse video.
See Also:
getExtPS

> Blink

public static final short Blink
Indicates that the character with this attribute mask is blinking in the display.
See Also:
getExtPS

> Underscore

public static final short Underscore
Indicates that the character with this attribute mask is displayed with an underscore.
See Also:
getExtPS

> Secure

public static final short Secure
Indicates that the character with this attribute mask is secure.
See Also:
getExtPS

> Dim

public static final short Dim
Indicates that the character with this attribute mask is dimmed in the display.
See Also:
getExtPS

> Bright

public static final short Bright
Indicates that the character with this attribute mask is bright in the display.
See Also:
getExtPS

> Bold

public static final short Bold
Indicates that the character with this attribute mask is displayed bold.
See Also:
getExtPS

> Normal

public static final short Normal
Indicates that the character with this attribute mask is normal.
See Also:
getExtPS

> LeftColSep

public static final short LeftColSep
Indicates that the character with this attribute mask is a left column separator.
See Also:
getExtPS

> DoubleWidth

public static final short DoubleWidth
Indicates that the character with this attribute mask is 2 characters wide on the display.
See Also:
getExtPS

> StrikeThrough

public static final short StrikeThrough
Indicates that the character with this attribute mask has been struck out in the display.
See Also:
getExtPS

> Special

public static final short Special
Indicates that the character with this attribute mask is special.
See Also:
getExtPS

> DoubleHeight

public static final short DoubleHeight
Indicates that the character with this attribute mask is 2 characters tall on the display.
See Also:
getExtPS

> Upper

public static final short Upper
Indicates that the character with this attribute mask is display in uppercase.
See Also:
getExtPS

> Top_Bottom

public static final short Top_Bottom
Indicates that the character with this attribute mask is double width and height on the top and bottom.
See Also:
getExtPS

> FgBlack

public static final byte FgBlack
Indicates that the character with this color attribute mask is black.
See Also:
getExtPS

> FgBlue

public static final byte FgBlue
Indicates that the character with this color attribute mask is blue.
See Also:
getExtPS

> FgGreen

public static final byte FgGreen
Indicates that the character with this color attribute mask is green.
See Also:
getExtPS

> FgCyan

public static final byte FgCyan
Indicates that the character with this color attribute mask is cyan.
See Also:
getExtPS

> FgRed

public static final byte FgRed
Indicates that the character with this color attribute mask is red.
See Also:
getExtPS

> FgMagenta

public static final byte FgMagenta
Indicates that the character with this color attribute mask is magenta.
See Also:
getExtPS

> FgYellow

public static final byte FgYellow
Indicates that the character with this color attribute mask is yellow.
See Also:
getExtPS

> FgWhite

public static final byte FgWhite
Indicates that the character with this color attribute mask is white.
See Also:
getExtPS

> FgGray

public static final byte FgGray
Indicates that the character with this color attribute mask is gray.
See Also:
getExtPS

> FgDarkBlue

public static final byte FgDarkBlue
Indicates that the character with this color attribute mask is dark blue.
See Also:
getExtPS

> FgDarkGreen

public static final byte FgDarkGreen
Indicates that the character with this color attribute mask is dark green.
See Also:
getExtPS

> FgDarkCyan

public static final byte FgDarkCyan
Indicates that the character with this color attribute mask is dark cyan.
See Also:
getExtPS

> FgDarkRed

public static final byte FgDarkRed
Indicates that the character with this color attribute mask is dark red.
See Also:
getExtPS

> FgDarkMagenta

public static final byte FgDarkMagenta
Indicates that the character with this color attribute mask is dark magenta.
See Also:
getExtPS

> FgDarkYellow

public static final byte FgDarkYellow
Indicates that the character with this color attribute mask is dark yellow.
See Also:
getExtPS

> FgDarkGray

public static final byte FgDarkGray
Indicates that the character with this color attribute mask is dark gray.
See Also:
getExtPS

> BgBlack

public static final byte BgBlack
Indicates that the background with this color attribute mask is black.
See Also:
getExtPS

> BgBlue

public static final byte BgBlue
Indicates that the background with this color attribute mask is blue.
See Also:
getExtPS

> BgGreen

public static final byte BgGreen
Indicates that the background with this color attribute mask is green.
See Also:
getExtPS

> BgCyan

public static final byte BgCyan
Indicates that the background with this color attribute mask is cyan.
See Also:
getExtPS

> BgRed

public static final byte BgRed
Indicates that the background with this color attribute mask is red.
See Also:
getExtPS

> BgMagenta

public static final byte BgMagenta
Indicates that the background with this color attribute mask is magenta.
See Also:
getExtPS

> BgYellow

public static final byte BgYellow
Indicates that the background with this color attribute mask is yellow.
See Also:
getExtPS

> BgWhite

public static final byte BgWhite
Indicates that the background with this color attribute mask is white.
See Also:
getExtPS

> BgGray

public static final byte BgGray
Indicates that the background with this color attribute mask is gray.
See Also:
getExtPS

> BgDarkBlue

public static final byte BgDarkBlue
Indicates that the background with this color attribute mask is dark blue.
See Also:
getExtPS

> BgDarkGreen

public static final byte BgDarkGreen
Indicates that the background with this color attribute mask is dark green.
See Also:
getExtPS

> BgDarkCyan

public static final byte BgDarkCyan
Indicates that the background with this color attribute mask is dark cyan.
See Also:
getExtPS

> BgDarkRed

public static final byte BgDarkRed
Indicates that the background with this color attribute mask is dark red.
See Also:
getExtPS

> BgDarkMagenta

public static final byte BgDarkMagenta
Indicates that the background with this color attribute mask is dark magenta.
See Also:
getExtPS

> BgDarkYellow

public static final byte BgDarkYellow
Indicates that the background with this color attribute mask is dark yellow.
See Also:
getExtPS

> BgDarkGray

public static final byte BgDarkGray
Indicates that the background with this color attribute mask is dark gray.
See Also:
getExtPS

> FIELDTYPE_ANY

public static final int FIELDTYPE_ANY
Specifies that the field type can be either a protected or unprotected field.
See Also:
fieldCount, findField, findFieldEx

> FIELDTYPE_PROTECTED

public static final int FIELDTYPE_PROTECTED
Specifies that the field type should be a protected field.
See Also:
fieldCount, findField, findFieldEx

> FIELDTYPE_UNPROTECTED

public static final int FIELDTYPE_UNPROTECTED
Specifies that the field type should be an unprotected field.
See Also:
fieldCount, findField, findFieldEx

> FINDFIELD_CURRENT

public static final int FINDFIELD_CURRENT
Specifies that the search will begin at the field where the cursor is currently located.
See Also:
findField, findFieldEx

> FINDFIELD_NEXT

public static final int FINDFIELD_NEXT
Specifies that the search will begin at the next field from where the cursor currently is located.
See Also:
findField, findFieldEx, putStringEx

> FINDFIELD_PREVIOUS

public static final int FINDFIELD_PREVIOUS
Specifies that the search will begin at the previous field from where the cursor is currently located.
See Also:
findField, findFieldEx

> KEYTYPE_BRACES

public static final int KEYTYPE_BRACES
Sets the key syntax to Braces style.
See Also:
sendKeys

> KEYTYPE_HLLAPI

public static final int KEYTYPE_HLLAPI
Sets the key syntax to HLLAPI style.
See Also:
sendKeys

> SCREENATTR_ANY

public static final int SCREENATTR_ANY
Indicates that the presentation space position is either protected or unprotected.
See Also:
getStringEx

> SCREENATTR_HIDDEN

public static final int SCREENATTR_HIDDEN
Indicates that the presentation space position is not visible.
See Also:
getStringEx

> SCREENATTR_PROTECTED

public static final int SCREENATTR_PROTECTED
Indicates that the presentation space position is protected.
See Also:
getStringEx

> SCREENATTR_UNPROTECTED

public static final int SCREENATTR_UNPROTECTED
Indicates that the presentation space position is unprotected.
See Also:
getStringEx

> SCREENATTR_VISIBLE

public static final int SCREENATTR_VISIBLE
Indicates that the presentation space position is visible.
See Also:
getStringEx

> WRAP_OFF

public static final int WRAP_OFF
Indicates that the search should stop at the end of the screen.
See Also:
findField, findFieldEx, getStringEx, putStringEx

> WRAP_ON

public static final int WRAP_ON
Indicates that the search should not stop at the end of the screen, but continue from the beginning of the screen and continue forward.
See Also:
findField, findFieldEx, getStringEx, putStringEx

Method Detail

> clearCapturedData

public void clearCapturedData()
Clears information from the captured data buffer by setting it to null. The data capture buffer allows you to save all information being sent to the presentation space (PS) session to a string.
Example:
document.myAppletID.clearCapturedData();
See Also:
getCapturedData, getDataCapture, getMaxDataCaptureLength, setDataCapture, setMaxDataCaptureLength

> fieldCount

public int fieldCount(int inType)
Returns the number of fields of the specified type. Fields are not supported in the ALC Terminal so this method will always return 0.
Parameters:
inType - Specifies the type of fields to count. Possible values include: FIELDTYPE_ANY, FIELDTYPE_PROTECTED, and FIELDTYPE_UNPROTECTED.
Returns:
The number of fields found of the specified type.
Example:
int fieldCount = document.myAppletID.fieldCount(document.myAppletID.FIELDTYPE_PROTECTED);

> findField

public boolean findField(int inRow,
                         int inCol,
                         int inMode,
                         int inType,
                         int inWrap)
Searches the screen for the specified field, beginning from the row and column position specified. For example, if you set both inRow and inCol to 1, and set inMode to FINDFIELD_NEXT, it will search for the next field that follows the specified screen position. If the specified field is found, returns true and the field's boundaries. Fields are not supported in the ALC terminal so this method will always returns false.
Parameters:
inRow - The row in which to begin searching.
inCol - The column in which to begin searching.
inMode - The field to look for: current, next, or previous (from the specified row and column position). Possible values include: FINDFIELD_CURRENT, FINDFIELD_NEXT, and FINDFIELD_PREVIOUS.
inType - The type of field to search for. Possible values include: FIELDTYPE_ANY, FIELDTYPE_PROTECTED, and FIELDTYPE_UNPROTECTED.
inWrap - Whether or not to wrap to the top of the screen after reaching the end of the screen. Possible values include: WRAP_ON and WRAP_OFF.
Returns:
True or false. If the field is found, the value is set to true; otherwise it is set to false. Also, outRow, outColumn, outLength, and outAttribute are public variables available using the applet id (i.e., document.myAppletID.outColumn).
outRow - The row where the field was found. If the field is not found, the value is set to zero.
outColumn - The column where the field was found. If the field is not found, the value is set to zero.
outLength - The length of the field that was found. If the field is not found, the value is set to zero.
outAttribute - A value representing the field attribute bits of the specified field. See one of the following for a list of field attributes returned for your host session type: 3270 Field Attributes, 5250 Field Attributes, T27 Field Attributes, UTS Field Attributes, or VT Field Attributes.

Note ALC Terminal Viewer does not have any field attributes. It always returns False from findField and findFieldEx.

Example:
int inRow = 1;
int inCol = 1;
int inMode = document.myAppletID.FINDFIELD_NEXT;
int inType = document.myAppletID.FIELDTYPE_PROTECTED;
int inWrap = document.myAppletID.WRAP_ON;
boolean fieldFound = document.myAppletID.findField(inRow, inCol,
   inMode, inType, inWrap );
See Also:
findFieldEx

> findFieldEx

public boolean findFieldEx(int beginIndex,
                           int inMode,
                           int inType,
                           int inWrap)
Searches the screen for the specified field, beginning from the index (field number) specified. For example, if you set beginIndex to 1 and set inMode to FINDFIELD_NEXT, it will search for the second field (the next field following field 1). If the specified field is found, returns true and the field's boundaries. Fields are not supported in the ALC terminal so this method will always returns false.
Parameters:
beginIndex - The index of the field from which to begin searching.
inMode - The field to look for: current, next, or previous (from the specified index). Possible values include: FINDFIELD_CURRENT, FINDFIELD_NEXT, and FINDFIELD_PREVIOUS.
inType - The type of field to search for. Possible values include: FIELDTYPE_ANY, FIELDTYPE_PROTECTED, and FIELDTYPE_UNPROTECTED.
inWrap - Whether or not to wrap to the top of the screen after reaching the end of the screen. Possible values include: WRAP_ON and WRAP_OFF.
Returns:
True or false. If the field is found, the value is set to true; otherwise it is set to false. Also, outRow, outColumn, outLength, and outAttribute are public variables available using the applet id (i.e., document.myAppletID.outColumn).
outRow - The row where the field was found. If the field is not found, the value is set to zero.
outColumn - The column where the field was found. If the field is not found, the value is set to zero.
outLength - The length of the field that was found. If the field is not found, the value is set to zero.
outAttribute - A value representing the field attribute bits of the specified field. See one of the following for a list of field attributes returned for your host session type: 3270 Field Attributes, 5250 Field Attributes, T27 Field Attributes, UTS Field Attributes, or VT Field Attributes.

Note ALC Terminal Viewer does not have any field attributes. It always returns False from findField and findFieldEx.

Example:
int beginIndex = 1;
int inMode = document.myAppletID.FINDFIELD_NEXT;
int inType = document.myAppletID.FIELDTYPE_PROTECTED;
int inWrap = document.myAppletID.WRAP_ON;
boolean fieldFound = document.myAppletID.findField(beginIndex,
   inMode, inType, inWrap);
See Also:
findField

> findString

public boolean findString(java.lang.String inText,
                          int inStartRow,
                          int inStartColumn)
Searches the screen for the specified text string, starting at the specified position. If the text is found, returns true and the start position of the string.
Parameters:
inText - The text to search for.
inStartRow - The row in which to begin searching.
inStartColumn - The column in which to begin searching.
Returns:
True or false. If the string is found, the value is set to true; otherwise it is set to false. Also, outRow and outColumn are public variables that available using the applet id (i.e., document.myAppletID.outColumn).
outRow - The row where the string was found. If the string is not found, the value is set to zero.
outColumn - The column where the string was found. If the string is not found, the value is set to zero.
Example:
String inText = "PASSWORD";
inStartRow = 1;
inStartColumn = 1;
boolean stringFound = document.myAppletID.findString(inText, inStartRow,
   inStartColumn);
See Also:
findStringEx

> findStringEx

public boolean findStringEx(java.lang.String inText,
                            int inStartRow,
                            int inStartColumn,
                            int inEndRow,
                            int inEndColumn,
                            int inArea,
                            int inWrap,
                            int inDir)
Searches the screen for the specified text string, from the specified start position to the specified end position. If found, it returns true and the start position of the string. Detected field attributes or hidden fields are treated as spaces.
Parameters:
inText - The text to search for.
inStartRow - The row in which to begin searching.
inStartColumn - The column in which to begin searching.
inEndRow - The row in which to stop searching.
inEndColumn - The column in which to stop searching.
inArea - Not used; set to 0.
inWrap - Whether or not to wrap to the top of the screen after reaching the end of the screen. Possible values include: WRAP_ON and WRAP_OFF.
inDir - The direction to search when looking for the string. When searching backwards, searching begins at the end of the selected area. Possible values include: DIRECTION_BACKWARD and DIRECTION_FORWARD.
Returns:
True or false. If the string is found, the value is set to true; otherwise it is set to false. Also, outRow and outColumn are public variables that available using the applet id (i.e., document.myAppletID.outColumn).
outRow - The row where the string was found. If the string is not found, the value is set to zero.
outColumn - The column where the string was found. If the string is not found, the value is set to zero.
Example:
String inText = "PASSWORD";
inStartRow = 1;
inStartColumn = 1;
inEndRow = 12;
inEndColumn = 80;
inArea = 0;
inWrap = document.myAppletID.WRAP_ON;
inDir = document.myAppletID.DIRECTION_FORWARD;
boolean stringFound = document.myAppletID.findStringEx(inText, inStartRow,
   inStartColumn,inEndRow, inEndColumn, inArea,
   inWrap, inDir);
See Also:
findString

> focusTerminal

public void focusTerminal()
Sets the focus to the terminal.
Example:
document.myAppletID.focusTerminal();

> getCapturedData

public java.lang.String getCapturedData()
Returns the currently captured data. The data capture facility allows you to save all information being sent to the presentation space (PS) session to a string.
Returns:
A string containing the data that is currently captured.
Example:
String gcd = document.myAppletID.getCapturedData();
See Also:
clearCapturedData, getDataCapture, getMaxDataCaptureLength, setDataCapture, setMaxDataCaptureLength

> getColumns

public int getColumns()
Returns the number of columns in the current presentation space (PS).
Returns:
The number of columns.
Example:
int numColumns = document.myAppletID.getColumns();
See Also:
getRows

> getConnectStatus

public boolean getConnectStatus()
Returns the connection status.
Returns:
True or false. If connected, the value is set to true; otherwise it is set to false.
Example:
document.myAppletID.getConnectStatus()

> getCursor

public java.awt.Cursor getCursor()
Makes current cursor postition available as variables outRow and outColumn.
Returns:
Current cursor position as public variables outRow and outColumn that are that available using the applet id (i.e., document.myAppletID.outColumn). outRow - The row where the string was found. If the string is not found, the value is set to zero.
outColumn - The column where the string was found. If the string is not found, the value is set to zero.
Example:
document.myAppletID.getCursor();
See Also:
getCursorColumn, getCursorRow, setCursor, setCursorColumn, setCursorRow

> getCursorColumn

public int getCursorColumn()
Returns the column of the current cursor position. A value of 1 is the left edge of the screen.
Returns:
The current cursor column.
Example:
int currentCursorColumn = document.myAppletID.getCursorColumn();
See Also:
getCursor, getCursorRow, setCursor, setCursorColumn, setCursorRow

> getCursorRow

public int getCursorRow()
Returns the row of the current cursor position. A value of 1 is the top row of the screen.
Returns:
The current cursor row.
Example:
int currentCursorRow = document.myAppletID.getCursorRow();
See Also:
getCursor, getCursorColumn, setCursor, setCursorColumn, setCursorRow

> getDataCapture

public boolean getDataCapture()
Returns the current state of the data capture facility: true if on; false if off. The data capture facility allows you to save all information being sent to the presentation space (PS) session to a string. The data capture facility is initially set to off until you activate it.
Returns:
True or false. If the data capture facility is on, the value is set to true; otherwise it is set to false.
Example:
boolean gDC = document.myAppletID.getDataCapture();
See Also:
clearCapturedData, getCapturedData, getMaxDataCaptureLength, setDataCapture, setMaxDataCaptureLength

> getExtPS

public java.lang.String getExtPS(int inStartRow,
                                 int inStartColumn,
                                 int inLength)
Returns the specified portion of the presentation space in a string format. Each character in the returned string is followed immediately by the extended character and extended color information for that character; as a result, the return string will contain three times the number of presentation space positions (characters) that you specify. See Extended Character Attributes or Extended Color Attributes for a list of attributes returned for a the host session types.
Parameters:
inStartRow - The first row from which to retrieve data.
inStartColumn - The first column from which to retrieve data.
inLength - The number of screen positions to return. Ignored when both inStartRow and inStartColumn are zero.
Returns:
A string containing the specified contents of presentation space. The string includes the requested presentation space positions (characters), as well as the extended character and extended color attributes for each character.
Example:
boolean isUnderscore = false;
boolean isBlinking = false;
boolean isForegroundBlue = false;
boolean isBackgroundYellow = false;

String ps;
ps = document.myAppletID.getExtPS(1,1,1000);
char display_character = ps.charAt(0);
char character_Attribute = ps.charAt(1);
char character_color = ps.charAt(2);

// Character attributes
if ((character_Attribute & document.myAppletID.Underscore) != 0)
  isUnderscore = true;
if ((character_Attribute & document.myAppletID.Blink) != 0)
  isBlinking = true;

// Character color attributes
if ((character_color & document.myAppletID.FgBlue) != 0)
  isForegroundBlue = true;
if ((character_color & document.myAppletID.BgYellow) != 0)
  isBackgroundYellow = true;


> getgetText_Display

public boolean getgetText_Display()
Returns the current setting of the getText_Display property. If getText_Display is set to true, the getText() method writes the entire text contents of the current presentation space to the Java Console, which can be useful for debugging and diagnostic purposes.
Returns:
True or false. If getText_Display is enabled, the value is set to true; otherwise it is set to false.
Example:
boolean ggTD = document.myAppletID.getgetText_Display();
See Also:
setgetText_Display

> getKeyboardLocked

public boolean getKeyboardLocked()
Returns the current state of the keyboard: true if locked; false if unlocked.
Returns:
True or false. If the keyboard is locked, the value is set to true; otherwise it is set to false.
Example:
boolean isKeyboardLocked = document.myAppletID.getKeyboardLocked();

> getMaxDataCaptureLength

public int getMaxDataCaptureLength()
Returns the current maximum buffer size for data captured using the data capture facility. The data capture facility allows you to save all information being sent to the presentation space (PS) session to a string. The default value is 9600 characters, which is the equivalent of 5 screens of data (5 x 1920). Any characters that exceed the specified buffer size are truncated.
Returns:
The current maximum buffer size (in characters).
Example:
int mdcl = document.myAppletID.getMaxDataCaptureLength();
See Also:
clearCapturedData, getCapturedData, getDataCapture, setDataCapture, setMaxDataCaptureLength

> getObjectVersion

public int getObjectVersion()
Returns the version number of the specified AtmApplet object; for example, 3000000 is equivalent to version 3.0.0.
Returns:
The AtmApplet object version.
Example:
int objVersion = document.myAppletID.getObjectVersion();

> getOIAContents

public java.lang.String getOIAContents()
Returns the data displayed in the OIA portion (status line) of the screen. See 3270 OIA Data, 5250 OIA Data, T27 OIA Data, UTS OIA Data, VT OIA Data, or ALC OIA Data for a detailed list of OIA data returned for your session type.
Returns:
A string containing the data displayed in the OIA portion of the screen.
Example:
String tmpstr;
tmpstr = document.myAppletID.getOIAContents();
int conn;
//get connection status
conn = tmpstr.charAt(83);
See Also:
getOIAText

> getOIAText

public java.lang.String getOIAText()
Returns the text of the OIA portion (status line) of the screen in a string format.
Returns:
The text that appears in the status line.
Example:
String OIA = document.myAppletID.getOIAText();
See Also:
getOIAContents

> getRows

public int getRows()
Returns the number of rows in the presentation space (PS).
Returns:
The number of rows.
Example:
int numRows = document.myAppletID.getRows();
See Also:
getColumns

> getScreenType

public int getScreenType()
Returns the current host type. The return values for the viewer types are: SCREEN_T27 = 100, SCREEN_UTS = 105, SCREEN_3270 = 110, SCREEN_5250 = 115, and SCREEN_VT = 120.
Returns:
The current host type.
Example:
int screenType = document.myAppletID.getScreenType();

> getString

public java.lang.String getString(int inStartRow,
                                  int inStartColumn,
                                  int inLength)
Returns the visible text from the specified location. If inStartRow and inStartColumn are zero, the entire screen is returned.
Parameters:
inStartRow - The first row from which to retrieve data.
inStartColumn - The first column from which to retrieve data.
inLength - The number of screen positions to return. Ignored when both inStartRow and inStartColumn are zero.
Returns:
The text string.
Example:
int inStartRow = 1;
int inStartColumn = 1;
int inLength = 12;

String visibleString = document.myAppletID.getString (inStartRow, inStartColumn, inLength );
See Also:
getStringEx

> getStringEx

public java.lang.String getStringEx(int inStartRow,
                                    int inStartColumn,
                                    int inEndRow,
                                    int inEndColumn,
                                    int inArea,
                                    int inWrap,
                                    int inAttr,
                                    int inFlags)
Returns text from the specified location, for attributes matching those specified by inAttr. If inStartRow and inStartColumn are zero, the entire screen is returned.
Parameters:
inStartRow - The first row from which to retrieve data.
inStartColumn - The first column from which to retrieve data.
inEndRow - The last row from which to retrieve data. Ignored when both inStartRow and inStartColumn are zero.
inEndColumn - The last column from which to retrieve data. Ignored when both inStartRow and inStartColumn are zero.
inArea - Not used; set to 0.
inWrap - Whether or not to wrap to the top of the screen after reaching the end of the screen. Possible values include: WRAP_ON and WRAP_OFF.
inAttr - The type of fields to retrieve. You can connect multiple options with OR to create various combinations. For example, SCREENATTR_UNPROTECTED | SCREENATTR_VISIBLE returns only unprotected, visible fields. Possible values include: SCREENATTR_ANY, SCREENATTR_HIDDEN, SCREENATTR_PROTECTED, SCREENATTR_UNPROTECTED, and SCREENATTR_VISIBLE.
inFlags - Not used; set to 0.
Returns:
The string at the specified location.
Example:
int inStartRow = 1;
int inStartColumn = 1;
int inEndRow = 12;
int inEndColumn = 10;
int inArea = 0;
int inWrap = document.myAppletID.WRAP_ON;
int inAttr = document.myAppletID.SCREENATTR_PROTECTED;
int inFlags = 0;

String matchString = document.myAppletID.getStringEx (inStartRow, inStartColumn, inEndRow, inEndColumn, inArea, inWrap, inAttr, inFlags);
See Also:
getString

> getText

public java.lang.String getText()
Returns the text contents of the presentation space (PS) as a string. The string returned has a CRLF at the end of each line of the screen.
Returns:
A string containing the text of the presentation space.
Example:
String hostText = document.myAppletID.getText();

> hideTerminal

public void hideTerminal()
The terminal will not display on the screen.
Example:
document.myAppletID.hideTerminal();
See Also:
showTerminal

> isKeyboardLocked

public boolean isKeyboardLocked()
Returns the current state of the keyboard: true if locked; false if unlocked.
Returns:
True or false. If the keyboard is locked, the value is set to true; otherwise it is set to false.
Example:
boolean isKeyboardLocked = document.myAppletID.isKeyboardLocked();

> putString

public int putString(java.lang.String inText,
                     int inRow,
                     int inColumn)
Copies a string of text to the specified position, returning the number of characters written.
Note: putString only copies text (not keystrokes) to the screen, and will overwrite any existing text (it is not affected by enabling Insert mode). To send keystrokes (such as Transmit or Tab), or to insert characters, use sendKeys.
Parameters:
inText - The text to copy to the host.
inRow - The row in which to begin writing.
inColumn - The column in which to begin writing.
Returns:
The number of characters written, or negative one if an error occurred. If a ProtectedFieldException, InputInhibitedException, or TruncatedException exception occurs, a message will be written into JavaConsole.
Example:
// putString - Copies a string of text to the host screen
      
      String inText = "PASSWORD";
      int inRow = 1;
      int inColumn = 1;
        
      int numCharsPut = document.myAppletID.putString (inText, inRow,
         inColumn );
See Also:
putStringEx, sendKeys

> putStringEx

public int putStringEx(java.lang.String inText,
                       int inStartRow,
                       int inStartColumn,
                       int inEndRow,
                       int inEndColumn,
                       int inArea,
                       int inWrap,
                       int inModes,
                       boolean inFill)
Copies a string of text to the specified position, returning the number of characters written. Similar to putString, but allows additional options. Data can be copied in block or stream mode, and can be copied to multiple unprotected fields. If inFill is true, the area is filled with the text specified by inText. Any characters that exceed the area are truncated.
Note: putStringEx only copies text (not keystrokes) to the screen, and will overwrite any existing text (it is not affected by enabling Insert mode). To send keystrokes (such as Transmit or Tab), or to insert characters, use sendKeys.
Parameters:
inText - The text to copy to the host.
inStartRow - The row at which to begin writing.
inStartColumn - The column at which to begin writing.
inEndRow - The row at which to stop writing.
inEndColumn - The column at which to stop writing.
inArea - Not used; set to 0.
inWrap - Whether or not to wrap to the top of the screen after reaching the end of the screen. Possible values include: WRAP_ON and WRAP_OFF.
inModes - Action to perform when a protected field is encountered while writing the string to the screen. Possible values include: PUTSTRING_SKIP, PUTSTRING_SPAN, and PUTSTRING_STOP.
inFill - When true, the area specified is filled with the string specified by inText.
Returns:
The number of characters written, or negative one if an error occurred. If a ProtectedFieldException, InputInhibitedException, or TruncatedException exception occurs, a message will be written into JavaConsole.
Example:
      //  putStringEx - Writes to the specified position,
      //  returning the number of characters put

      String inText = "PASSWORD";
      int inStartRow = 1;
      int inStartColumn = 1;
      int inEndRow = 12;
      int inEndColumn = 10;
      int inArea = 0;
      int inWrap =  document.myAppletID.WRAP_ON;
      int inModes = document.myAppletID.FINDFIELD_NEXT;
      boolean inFill = true;
           
      int numCharsPut = document.myAppletID.putStringEx (inText, inStartRow,
         inStartColumn,inEndRow, inEndColumn, inArea,
         inWrap, inModes, inFill); 
See Also:
putString, sendKeys

> sendKeys

public int sendKeys(java.lang.String KeysSequence,
                    int iType)
Sends characters and special keys to the host session. Keys are sent to the current cursor position. Keystrokes can be specified in HLLAPI format, which has a special code for each host keystroke, such as "@E" for the host Transmit key, or Braces format, where the key name is surrounded by braces, such as "{Transmit}". See 3270 Key Codes, 5250 Key Codes, T27 Key Codes, UTS Key Codes, VT Key Codes, or ALC Key Codes for a complete list of key codes for your session type.

You can also use sendKeys to send text character strings to the host. Text is sent to the current cursor location. For example, to send the text "logoff" followed by the Transmit key, inText would be "logoff@E". If you are sending a lot of text to the screen, however, it may be more efficient to use putString or putStringEx instead. If an invalid key sequence is detected, no characters or keys are sent.

It is recommended that you follow every sendKey call with a call to one of the Wait methods (for example, WaitForString, WaitHostQuiet, or WaitForCursor). This helps to ensure that the host has completed processing before your application moves on to the next step.
Parameters:
inText - Keys to send to the host. This can be a combination of text characters and host keystrokes, however only one host keystroke can be sent in each call and the host keystroke must be the last key sent. See 3270 Key Codes, 5250 Key Codes, T27 Key Codes, UTS Key Codes, VT Key Codes, or ALC Key Codes for a list of key codes.
inType - The format of the host keystrokes included in the string, either HLLAPI format or BRACES format.
Examples:
// send Transmit key at current cursor position
document.myAppletID.sendKeys("@E",document.myAppletID.KEYTYPE_HLLAPI);
// The next line is equivalent to the line above
document.myAppletID.sendKeys("{Transmit}",document.myAppletID.KEYTYPE_BRACES);
See Also:
putString, putStringEx

> setCursor

public boolean setCursor(int inRow,
                         int inColumn)
Sets the cursor position on the presentation space (PS).
Parameters:
inRow - The row in which the cursor is placed.
inColumn - The column in which the cursor is placed.
Returns:
True or false. If an error does not occur the value is set to true; otherwise it is set to false. If a CursorPositionException exception occurs, a message will be written into JavaConsole.
Example:
int inRow = 17;
int inColumn = 20;
int retValue = document.myAppletID.setCursor(inRow, inColumn);
See Also:
setCursorColumn, setCursorRow, getCursor, getCursorColumn, getCursorRow

> setCursorColumn

public boolean setCursorColumn(int inCursorColumn)
Sets the column of the cursor position.
Parameters:
cursorcolumn - The column in which the cursor is placed.
Returns:
True or false. If an error does not occur the value is set to true; otherwise it is set to false. If a CursorPositionException exception occurs, a message will be written into JavaConsole.
Example:
int inCursorColumn = 20;
int retValue = document.myAppletID.setCursorColumn(inCursorColumn);
See Also:
setCursor, setCursorRow, getCursor, getCursorColumn, getCursorRow

> setCursorRow

public boolean setCursorRow(int inCursorRow)
Sets the row of the cursor position.
Parameters:
cursorrow - The row in which the cursor is placed.
Returns:
True or false. If an error does not occur the value is set to true; otherwise it is set to false. If a CursorPositionException exception occurs, a message will be written into JavaConsole.
Example:
int CursorRow = 17;
int retValue = document.myAppletID.setCursorRow(CursorRow);
See Also:
setCursor, setCursorColumn, getCursor, getCursorColumn, getCursorRow

> setDataCapture

public void setDataCapture(boolean sDCVal)
Turns the data capture facility on or off. Valid values are true to turn it on, or false to turn it off. The data capture facility allows you to save all information being sent to the presentation space (PS) session to a string. The data capture facility is initially set to off until you activate it.
Parameters:
sDCVal - Specifies whether to turn the data capture facility on (true) or off (false).
Example:
document.myAppletID.setDataCapture(true);
See Also:
clearCapturedData, getCapturedData, getDataCapture, getMaxDataCaptureLength, setMaxDataCaptureLength

> setgetText_Display

public void setgetText_Display(boolean gtdvalue)
Turns the getText_Display property on or off. Valid values are true to turn it on, or false to turn it off. If getText_Display is set to true, the getText() method writes the entire text contents of the current presentation space to the Java Console, which can be useful for debugging and diagnostic purposes.
Parameters:
gtdvalue - Specifies whether to turn the getText_Display property on (true) or off (false).
Example:
document.myAppletID.setgetText_Display(false);
See Also:
getgetText_Display

> setMaxDataCaptureLength

public void setMaxDataCaptureLength(int dcl)
Sets the maximum buffer size for data captured using the data capture facility. The data capture facility allows you to save all information being sent to the presentation space (PS) session to a string. The default value is 9600 characters, which is the equivalent of 5 screens of data (5 x 1920). Any characters that exceed the specified size are truncated.
Parameters:
dcl - The number of characters to save in the buffer.
Example:
document.myAppletID.setMaxDataCaptureLength(10000);
See Also:
clearCapturedData, getCapturedData, getDataCapture, getMaxDataCaptureLength, setDataCapture

> showColorDialog

public void showColorDialog()
Displays the color dialog.
Example:
document.myAppletID.showColorDialog();

> showTerminal

public void showTerminal()
The terminal will be displayed.
Example:
document.myAppletID.showTerminal();
See Also:
hideTerminal

> waitForCursor

public boolean waitForCursor(int inRow,
                             int inCol,
                             int wTime)
Waits for the cursor to appear at the specified position, for a specified period of time. If inRow is zero, the wait completes when the cursor moves to the specified column. If inColumn is zero, the wait completes when the cursor moves to the specified row. Otherwise, it times out after wtTime (specified in milliseconds).
Parameters:
inRow - The row in which the cursor must appear to satisfy the wait. When inRow is set to zero, the wait is satisfied when the cursor appears in the column specified, regardless of which row the cursor is in.
inColumn - The column in which the cursor must appear to satisfy the wait. When inColumn is set to zero, the wait is satisfied when the cursor appears in the row specified, regardless of which column the cursor is in.
wtTime - The number of milliseconds to wait for the wait condition to be satisfied before timing out.
Returns:
True or false. If an error does not occur the value is set to true; otherwise it is set to false. If a TimedOutException exception occurs, a message will be written into JavaConsole.
Example:
int inRow = 17;
int inColumn = 20;
int wtTime = 3000;
int retValue = document.myAppletID.waitForCursor(inRow, inColumn, wtTime);
See Also:
waitForString, waitHostQuiet

> waitForString

public boolean waitForString(java.lang.String inText,
                             int inRow,
                             int inCol,
                             int wTime)
Waits for the specified text to appear at the specified position, for a specified period of time. If the row and column are zero, it waits for text to appear anywhere on the screen. Otherwise, it times out after wtTime (specified in milliseconds).
Parameters:
inText - The text string to wait for.
inRow - The row in which to look for the string. If the row is set to zero, the wait is satisfied if the string appears in the column specified, regardless of the row.
inColumn - The column in which to look for the string. If the column is set to zero, the wait is satisfied if the string appears in the row specified, regardless of the column.
wtTime - The number of milliseconds to wait for the wait condition to be satisfied before timing out.
Returns:
True or false. If an error does not occur the value is set to true; otherwise it is set to false. If a TimedOutException exception occurs, a message will be written into JavaConsole.
Example:
// waitForString - Waits for the specified text to appear at the
// specified position.
String inText = "Ready";
int inRow = 17;
int inColumn = 20;
int wtTime = 3000;
int retValue = document.myAppletID.waitForString(inText, inRow, inColumn, wtTime);
See Also:
waitForCursor, waitHostQuiet

> waitHostQuiet

public boolean waitHostQuiet(int sTime,
                             int wTime)
Waits for the host session to be idle for a specified period of time (in milliseconds). A session is considered to be "quiet" when there has been no activity in the host session for the specified amount of time. This is a synchronous call and does not return until the wait condition is satisfied. Otherwise, it times out after wtTime (specified in milliseconds).
Parameters:
inSettleTime - The amount of time (in milliseconds), that the session needs to be idle before the wait condition is satisfied. The optimum settle time varies depending on the host application response time. For most host applications, a settle time of one to three seconds is sufficient.
wtTime - The number of milliseconds to wait for the wait condition to be satisfied before timing out.
Returns:
True or false. If an error does not occur the value is set to true; otherwise it is set to false. If a TimedOutException exception occurs, a message will be written into JavaConsole.
Example:
// waitHostQuiet - Waits for the host session to be idle for a specified
// period of time (in milliseconds). int inSettleTime = 1000;
int wtTime = 3000;
int retValue = document.myAppletID.waitHostQuiet(inSettleTime, wtTime);
See Also:
waitForCursor, waitForString
Related Topics
Bullet Express Terminal Macros, Overview
Bullet Viewer API, Overview
  Attachmate