All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class utils.TxtGrph

java.lang.Object
   |
   +----utils.TxtGrph

public class TxtGrph
extends Object

Constructor Index

 o TxtGrph()

Method Index

 o affirmative(String)
Prompts for a 'Y' or 'N' response from the user
 o beep()
Beeps the speaker
 o down(int)
Move cursor down n rows, but not below row 23 Row 24 is reserved for prompts This procedure cannot scroll the screen
 o eraseAll()
Erase entire screen.
 o eraseBlock(int, int, int, int)
Erase block of characters on the screen
 o eraseChars(int)
Erase numchar characters starting at the cursor Does not test for writing past right mrgin.
 o eraseDown()
Erase from cursor to bottom of the screen
 o eraseLeft()
Erase from start of line to cursor
 o erasePrompt()
Clears prompt line
 o eraseRight()
Erase from cursor to end of the line
 o eraseUp()
Erase from top of screen to cursor.
 o getArrows()
Waits for an arrow key to be pressed.
 o home()
move the cursor to the top lefthand corner of screen.
 o homeAndClear()
Clear screen then place cursor in upper left corner.
 o horizLine(int)
Draw horizontal line across from current cursor position
 o left(int)
Move cursor n columns to left, but not beyond column 0 This command will not move the cursor to a different row
 o main(String[])
 o position(int, int)
Position cursor at specified row and column
 o prompt(String)
Write a message on the prompt line
 o restoreCursor()
Restore most recently saved cursor position
 o right(int)
Move cursor n columns to right; This command will not move the cursor to a different row
 o saveCursor()
Store cursor position, overwriting any previously saved positions
 o setBold()
Put into bold type (extra bright)
 o setNormal()
Restore to normal video The following function sets the local display so that all characters displayed after this function was called, would display using the default attributes, white-on-black, non-blinking.
 o setReverse()
Put into reverse video, dark characters on light background.
 o setUnderline()
 o sleep(double)
Pauses the machine for n seconds.
 o up(int)
Move cursor up n rows, but not above row 0 This procedure cannot scroll the screen
 o vertLine(int)
Draw vertical line down, from current cursor position cursor ends up below last segment of line

Constructors

 o TxtGrph
 public TxtGrph()

Methods

 o position
 public static void position(int row,
                             int column)
Position cursor at specified row and column

 o up
 public static void up(int n)
Move cursor up n rows, but not above row 0 This procedure cannot scroll the screen

 o down
 public static void down(int n)
Move cursor down n rows, but not below row 23 Row 24 is reserved for prompts This procedure cannot scroll the screen

 o right
 public static void right(int n)
Move cursor n columns to right; This command will not move the cursor to a different row

 o left
 public static void left(int n)
Move cursor n columns to left, but not beyond column 0 This command will not move the cursor to a different row

 o home
 public static void home()
move the cursor to the top lefthand corner of screen.

 o saveCursor
 public static void saveCursor()
Store cursor position, overwriting any previously saved positions

 o restoreCursor
 public static void restoreCursor()
Restore most recently saved cursor position

 o setNormal
 public static void setNormal()
Restore to normal video The following function sets the local display so that all characters displayed after this function was called, would display using the default attributes, white-on-black, non-blinking. It has no effect if the default mode is already selected. The characters already on the screen are not changed. These attribute settings affect only the specified positions on the screen. They may be set either before or after characters are written there. Any combination of bold, underline, and reverse is possible

 o setBold
 public static void setBold()
Put into bold type (extra bright)

 o setUnderline
 public static void setUnderline()
 o setReverse
 public static void setReverse()
Put into reverse video, dark characters on light background.

 o eraseBlock
 public static void eraseBlock(int top,
                               int left,
                               int bottom,
                               int right)
Erase block of characters on the screen

 o eraseChars
 public static void eraseChars(int numchar)
Erase numchar characters starting at the cursor Does not test for writing past right mrgin.

 o eraseRight
 public static void eraseRight()
Erase from cursor to end of the line

 o eraseLeft
 public static void eraseLeft()
Erase from start of line to cursor

 o eraseDown
 public static void eraseDown()
Erase from cursor to bottom of the screen

 o eraseUp
 public static void eraseUp()
Erase from top of screen to cursor.

 o eraseAll
 public static void eraseAll()
Erase entire screen.

 o homeAndClear
 public static void homeAndClear()
Clear screen then place cursor in upper left corner.

 o prompt
 public static void prompt(String message)
Write a message on the prompt line

 o erasePrompt
 public static void erasePrompt()
Clears prompt line

 o sleep
 public static void sleep(double n)
Pauses the machine for n seconds.

 o affirmative
 public static boolean affirmative(String message)
Prompts for a 'Y' or 'N' response from the user

 o beep
 public static void beep()
Beeps the speaker

 o getArrows
 public static int getArrows()
Waits for an arrow key to be pressed. Codes are: arrows (codes 1-4), 'Q' (code 0), RETURN key (code -1) NOTE: CODES ARE ALWAYS 0 IF ARROW KEY NOT PRESSED (C++ vn. bug) See C++ code version in comment following

 o horizLine
 public static void horizLine(int length)
Draw horizontal line across from current cursor position

 o vertLine
 public static void vertLine(int Height)
Draw vertical line down, from current cursor position cursor ends up below last segment of line

 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index