com.ibm.cics.server
Class Cursor

java.lang.Object
  extended bycom.ibm.cics.server.Cursor

public class Cursor
extends java.lang.Object

This class provides a set of methods and variables that correspond to the CURSOR of a CICS terminal.

Author:
John Colgrave

Constructor Summary
Cursor(int width, int height)
          Construct a cursor for a screen of the supplied width and height and an initial position of (1,1).
Cursor(int width, int height, int column, int row)
          Construct a cursor for a screen of the supplied width and height and a supplied initial position.
 
Method Summary
 void decrement()
          Decrement the cursor position.
 int getColumn()
          Get the current cursor column position.
 int getRow()
          Get the current cursor row position.
 void increment()
          Increment the cursor position.
 void increment(int extra)
          Increment the cursor position by the supplied amount.
 void incrementRow()
          Increment the row of the cursor (by 1).
 void setColumn(int newColumn)
          Set the column of the cursor to the supplied value.
 void setRow(int newRow)
          Set the row of the cursor to the supplied value.
 int toBinary()
          Convert the Cursor to a binary value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cursor

public Cursor(int width,
              int height)
Construct a cursor for a screen of the supplied width and height and an initial position of (1,1).

Parameters:
width - The width of the display.
height - The height of the display.

Cursor

public Cursor(int width,
              int height,
              int column,
              int row)
Construct a cursor for a screen of the supplied width and height and a supplied initial position. Note that top left of the screen is position 0, row 1, col 1

Parameters:
width - The width of the display.
height - The height of the display.
column - The column where the cursor is.
row - The row where the cursor is.
Method Detail

decrement

public void decrement()
Decrement the cursor position.


increment

public void increment()
Increment the cursor position.


increment

public void increment(int extra)
Increment the cursor position by the supplied amount.

Parameters:
extra - the amount by which to move the cursor.

incrementRow

public void incrementRow()
Increment the row of the cursor (by 1).


setColumn

public void setColumn(int newColumn)
Set the column of the cursor to the supplied value.

Parameters:
newColumn - The new column of the cursor.

setRow

public void setRow(int newRow)
Set the row of the cursor to the supplied value.

Parameters:
newRow - The new row of the cursor.

getColumn

public int getColumn()
Get the current cursor column position. This method is new in CICS TS 2.1.

Returns:
integer value of the cursor column (between 1 and n)

getRow

public int getRow()
Get the current cursor row position. This method is new in CICS TS 2.1.

Returns:
integer value of the cursor row (between 1 and n)

toBinary

public int toBinary()
Convert the Cursor to a binary value.

Returns:
an integer which represents the cursor value.