Class SimpleInput

java.lang.Object
  extended bySimpleInput

public class SimpleInput
extends java.lang.Object

Class SimpleInput - input class for input of simple input types via simple dialog box. eg. int, char, String,float or boolean.


Method Summary
static boolean getBoolean(java.lang.String prompt)
          boolean selection from the user via a simple dialog.
static boolean getBoolean(java.lang.String prompt, java.lang.String trueText, java.lang.String falseText)
          boolean selection from the user via a simple dialog.
static char getChar(java.lang.String prompt)
          returns character input from the user via a simple dialog.
static char getChar(java.lang.String prompt, char initialValue)
          returns character input from the user via a simple dialog.
static char getChar(java.lang.String prompt, java.lang.String initialValue)
          returns character input from the user via a simple dialog.
static float getFloat(java.lang.String prompt)
          returns a float input from the user via a simple dialog.
static float getFloat(java.lang.String prompt, float initialValue)
          returns float input from the user via a simple dialog.
static float getFloat(java.lang.String prompt, java.lang.String initialValue)
          returns float input from the user via a simple dialog.
static int getInt(java.lang.String prompt)
          returns integer input from the user via a simple dialog.
static int getInt(java.lang.String prompt, int initialValue)
          returns integer input from the user via a simple dialog.
static int getInt(java.lang.String prompt, java.lang.String initialValue)
          returns integer input from the user via a simple dialog.
static java.lang.String getString(java.lang.String prompt)
          String input from the user via a simple dialog.
static java.lang.String getString(java.lang.String prompt, java.lang.String initialValue)
          String input from the user via a simple dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static java.lang.String getString(java.lang.String prompt)
String input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
Returns:
String input from the user.

getString

public static java.lang.String getString(java.lang.String prompt,
                                         java.lang.String initialValue)
String input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input string that is initially displayed as selected by the user
Returns:
String input from the user.

getChar

public static char getChar(java.lang.String prompt)
returns character input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
Returns:
the input character

getChar

public static char getChar(java.lang.String prompt,
                           char initialValue)
returns character input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input value that is initially displayed as selected by the user
Returns:
the input character

getChar

public static char getChar(java.lang.String prompt,
                           java.lang.String initialValue)
returns character input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input string that is initially displayed as selected by the user
Returns:
the input character

getBoolean

public static boolean getBoolean(java.lang.String prompt,
                                 java.lang.String trueText,
                                 java.lang.String falseText)
boolean selection from the user via a simple dialog.

Parameters:
prompt - message to appear in dialog
trueText - message to appear on true "button"
falseText - message to appear on "false" button
Returns:
boolean selection from the user

getBoolean

public static boolean getBoolean(java.lang.String prompt)
boolean selection from the user via a simple dialog.

Parameters:
prompt - message to appear in dialog
Returns:
boolean selection from the user

getInt

public static int getInt(java.lang.String prompt)
returns integer input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
Returns:
the input integer

getInt

public static int getInt(java.lang.String prompt,
                         int initialValue)
returns integer input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input value that is initially displayed as selected by the user
Returns:
the input integer

getInt

public static int getInt(java.lang.String prompt,
                         java.lang.String initialValue)
returns integer input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input string that is initially displayed as selected by the user
Returns:
the input integer

getFloat

public static float getFloat(java.lang.String prompt)
returns a float input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
Returns:
the input float

getFloat

public static float getFloat(java.lang.String prompt,
                             float initialValue)
returns float input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input value that is initially displayed as selected by the user
Returns:
the input float

getFloat

public static float getFloat(java.lang.String prompt,
                             java.lang.String initialValue)
returns float input from the user via a simple dialog.

Parameters:
prompt - the message string to be displayed inside dialog
initialValue - input string that is initially displayed as selected by the user
Returns:
the input float