ikg.tools.simpleInput
Class SimpleInput

java.lang.Object
  extended byikg.tools.simpleInput.SimpleInput

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.


Field Summary
(package private) static java.lang.String BOOLEAN_TITLE
           
(package private) static java.lang.String CHAR_TITLE
           
(package private) static java.lang.String EMPTY_STRING
           
(package private) static java.lang.String FALSE
           
(package private) static java.lang.String FLOAT_TITLE
           
(package private) static java.lang.String INT_TITLE
           
(package private) static java.lang.String STRING_TITLE
           
(package private) static java.lang.String TRUE
           
 
Constructor Summary
SimpleInput()
           
 
Method Summary
 boolean getBoolean(java.lang.String prompt)
          boolean selection from the user via a simple dialog.
 boolean getBoolean(java.lang.String prompt, java.lang.String trueText, java.lang.String falseText)
          boolean selection from the user via a simple dialog.
 char getChar(java.lang.String prompt)
          char input from the user via a simple dialog.
 float getFloat(java.lang.String prompt)
          returns a float input from the user via a simple dialog.
 int getInt(java.lang.String prompt)
          returns integer input from the user via a simple dialog.
 java.lang.String getString(java.lang.String prompt)
          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
 

Field Detail

BOOLEAN_TITLE

static final java.lang.String BOOLEAN_TITLE
See Also:
Constant Field Values

CHAR_TITLE

static final java.lang.String CHAR_TITLE
See Also:
Constant Field Values

EMPTY_STRING

static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

FALSE

static final java.lang.String FALSE
See Also:
Constant Field Values

FLOAT_TITLE

static final java.lang.String FLOAT_TITLE
See Also:
Constant Field Values

INT_TITLE

static final java.lang.String INT_TITLE
See Also:
Constant Field Values

STRING_TITLE

static final java.lang.String STRING_TITLE
See Also:
Constant Field Values

TRUE

static final java.lang.String TRUE
See Also:
Constant Field Values
Constructor Detail

SimpleInput

public SimpleInput()
Method Detail

getBoolean

public 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

getBoolean

public 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

getChar

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

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

getFloat

public 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

getInt

public 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

getString

public 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.