All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.core.TTYDisplay

java.lang.Object
   |
   +----com.sun.wizards.core.TTYDisplay

public class TTYDisplay
extends Object

Variable Index

 o NO_DEFAULT
 o TABLE_PADDING
The amount of apdding on a table entry

Constructor Index

 o TTYDisplay()

Method Index

 o clear()
Clears the screen by scrolling N lines, where N is the height of the terminal
 o clear(int)
Clears the screen by scrolling N lines, where N is the height of the terminal
 o createTable(Vector)
 o displayTable(Vector)
 o initialize()
Constructs a TTYDisplay using System.in and System.out and a width of 80 characters
 o initialize(InputStream, OutputStream, int)
Constructs a TTYDisplay given input and output and width
 o initialize(int)
Constructs a TTYDisplay given a width using System.in and System.out
 o pageText(String)
Shows lots of text, a page at a time (lines should be '\n'-separated
 o print(String)
A method to dump directly to the screen
 o queryValue(String, int, int, int, String)
A method to display a query to the screen that must return integers within a certain range
 o queryValue(String, String)
A method to display a query to the screen and store the result witha given name
 o queryValue(String, String, String)
A method to display a query to the screen and store the result witha given name, and defaulting to a certain value
 o queryValue(String, String, String, WizardComponent, String)
 o queryValue(String, String, String[], boolean, String)
 o queryValue(String, String, String[], int, String)
 o queryValue(String, String, String[], String)
 o showHelp(String)
 o showNewline()
A method to display new line to the screen.
 o showText(String)
A method to display text to the screen.
 o showText(String, int)

Variables

 o TABLE_PADDING
 public static final int TABLE_PADDING
The amount of apdding on a table entry

 o NO_DEFAULT
 public static final String NO_DEFAULT

Constructors

 o TTYDisplay
 public TTYDisplay()

Methods

 o initialize
 public static void initialize()
Constructs a TTYDisplay using System.in and System.out and a width of 80 characters

 o initialize
 public static void initialize(int width)
Constructs a TTYDisplay given a width using System.in and System.out

Parameters:
width - The width of the conosle, in characters
 o initialize
 public static void initialize(InputStream inStream,
                               OutputStream outStream,
                               int width)
Constructs a TTYDisplay given input and output and width

Parameters:
inStream - Where to read data from
outStream - Where to write data to
width - The width of the conosle, in characters
 o showHelp
 public static boolean showHelp(String help)
 o clear
 public static void clear(int lines)
Clears the screen by scrolling N lines, where N is the height of the terminal

Parameters:
lines - the number of lines to clear
 o clear
 public static void clear()
Clears the screen by scrolling N lines, where N is the height of the terminal

 o pageText
 public static void pageText(String text)
Shows lots of text, a page at a time (lines should be '\n'-separated

Parameters:
text - The text to show, '\n'-separated.
 o showText
 public static void showText(String text)
A method to display text to the screen. It will format it to nicely fit the available space

Parameters:
text - the text to show
 o showText
 public static void showText(String text,
                             int indent)
 o print
 public static void print(String text)
A method to dump directly to the screen

 o showNewline
 public static void showNewline()
A method to display new line to the screen.

 o queryValue
 public static String queryValue(String prompt,
                                 String help)
A method to display a query to the screen and store the result witha given name

Parameters:
query - the text to show
name - the name of the value to store it in
Returns:
the value read from the user
 o queryValue
 public static int queryValue(String prompt,
                              int defval,
                              int min,
                              int max,
                              String help)
A method to display a query to the screen that must return integers within a certain range

Parameters:
text - the text to show
defval - the default value (or Integer.MAX for none)
min - the minimum value
max - the maximum value
name - the name of the value to store it in
Returns:
the value read from the user
 o queryValue
 public static String queryValue(String prompt,
                                 String defval,
                                 String vals[],
                                 String help)
 o queryValue
 public static String queryValue(String prompt,
                                 String defval,
                                 String vals[],
                                 boolean ignoreCase,
                                 String help)
 o queryValue
 public static int queryValue(String prompt,
                              String desc,
                              String options[],
                              int defval,
                              String help)
 o queryValue
 public static String queryValue(String prompt,
                                 String defval,
                                 String help,
                                 WizardComponent callback,
                                 String id)
 o queryValue
 public static String queryValue(String text,
                                 String defval,
                                 String help)
A method to display a query to the screen and store the result witha given name, and defaulting to a certain value

Parameters:
query - the text to show
default - the default value of name
name - the name of the value to store it in
Returns:
the value read from the user
 o displayTable
 public static void displayTable(Vector data)
 o createTable
 public static String createTable(Vector data)

All Packages  Class Hierarchy  This Package  Previous  Next  Index