Utilities
Class Screen

java.lang.Object
  |
  +--Utilities.Screen

public abstract class Screen
extends java.lang.Object

Allows full screen cursor manipulation using ANSI codes. Class is declared abstract, cannot be instantiated and doesn't need to be. All methods and methods are used for screen manipulations only. This class does not edit or alter any external data.

Version:
1.1
Author:
J. Dalbey

Field Summary
static int blinkAttribute
          Constants used to represent different attributes of the cursor
static int boldAttribute
          Constants used to represent different attributes of the cursor
static int inverseAttribute
          Constants used to represent different attributes of the cursor
static int normalAttribute
          Constants used to represent different attributes of the cursor
 
Method Summary
static void beep()
          Creates a beep from the Unix console
static void clearScreen()
          Clears the screen
static void moveCursor(int row, int col)
          Moves the cursor to the row and columns entered.
static void restoreCursor()
          This method restores the previously save cursor setup
static void saveCursor()
          This method saves the current cursor setup
static void setAttribute(int theAttribute)
          Sets cursor's attribute to different states: normal, bold, inverse, or blinking.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

normalAttribute

public static final int normalAttribute
Constants used to represent different attributes of the cursor

See Also:
Constant Field Values

boldAttribute

public static final int boldAttribute
Constants used to represent different attributes of the cursor

See Also:
Constant Field Values

inverseAttribute

public static final int inverseAttribute
Constants used to represent different attributes of the cursor

See Also:
Constant Field Values

blinkAttribute

public static final int blinkAttribute
Constants used to represent different attributes of the cursor

See Also:
Constant Field Values
Method Detail

beep

public static void beep()
Creates a beep from the Unix console


clearScreen

public static void clearScreen()
Clears the screen


moveCursor

public static void moveCursor(int row,
                              int col)
Moves the cursor to the row and columns entered. Prints error message if cursor position is off the screen.

Parameters:
row - - row position of the cursor to be moved to.
col - - column position of the cursor to be moved to.

setAttribute

public static void setAttribute(int theAttribute)
Sets cursor's attribute to different states: normal, bold, inverse, or blinking.

Parameters:
theAttribute - - cursor status switch value.

saveCursor

public static void saveCursor()
This method saves the current cursor setup


restoreCursor

public static void restoreCursor()
This method restores the previously save cursor setup