|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.pzfilereader.examples.ConsoleMenu
public class ConsoleMenu

| Constructor Summary | |
|---|---|
ConsoleMenu(Repeater containingObject)
|
|
| Method Summary | |
|---|---|
void |
addMenuItem(java.lang.String menuDisplay,
java.lang.String methodName,
boolean repeat)
add an entry in the menu, sequentially |
void |
displayMenu()
display the menu, the application goes into a loop which provides the menu and fires the entries selected. |
static java.math.BigDecimal |
getBigDecimal(java.lang.String title,
java.math.BigDecimal defaultValue)
Gets an BigDecimal from the System.in |
static boolean |
getBoolean(java.lang.String title,
boolean defaultValue)
Gets a boolean from the System.in |
static java.util.Date |
getDate(java.lang.String title,
java.util.Date defaultValue)
|
static int |
getInt(java.lang.String title,
int defaultValue)
Gets an int from the System.in |
static java.lang.String |
getPassword(java.lang.String prompt)
|
static java.lang.String |
getString(java.lang.String msg,
java.lang.String defaultValue)
Gets a String from the System.in |
static java.lang.String |
selectOne(java.lang.String title,
java.lang.String[] optionNames,
java.lang.String[] optionValues,
int defaultOption)
Generates a menu with a list of options and return the value selected. |
void |
setScreenColumns(int width)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsoleMenu(Repeater containingObject)
containingObject - the object that will be called back once an option is chosen
in the menu| Method Detail |
|---|
public void addMenuItem(java.lang.String menuDisplay,
java.lang.String methodName,
boolean repeat)
menuDisplay - how the entry will be displayed in the menumethodName - name of the public methodaskForRepeat - call back for repeatpublic void setScreenColumns(int width)
public void displayMenu()
public static int getInt(java.lang.String title,
int defaultValue)
title - for the command line
public static boolean getBoolean(java.lang.String title,
boolean defaultValue)
title - for the command line
public static java.math.BigDecimal getBigDecimal(java.lang.String title,
java.math.BigDecimal defaultValue)
title - for the command line
public static java.util.Date getDate(java.lang.String title,
java.util.Date defaultValue)
public static java.lang.String getString(java.lang.String msg,
java.lang.String defaultValue)
msg - for the command line
public static java.lang.String selectOne(java.lang.String title,
java.lang.String[] optionNames,
java.lang.String[] optionValues,
int defaultOption)
title - for the command lineoptionNames - name for each optionoptionValues - value for each option
public static java.lang.String getPassword(java.lang.String prompt)
prompt - The prompt to display to the user.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||