public class SimpleIO
extends java.lang.Object
Constructor and Description |
---|
SimpleIO() |
Modifier and Type | Method and Description |
---|---|
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)
char input from the user via a simple dialog.
|
static double |
getDouble(java.lang.String prompt)
returns a double 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 int |
getInt(java.lang.String prompt)
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 void |
output(java.lang.String content,
java.lang.String title)
prints the string "content" in a window with the title "title"
|
static void |
outputEnd(java.lang.String content,
java.lang.String title)
prints the string "content" in a window with the title "title" and ends the program afterwards
|
public static java.lang.String getString(java.lang.String prompt)
prompt
- the message string to be displayed inside dialogpublic static char getChar(java.lang.String prompt)
prompt
- the message string to be displayed inside dialogpublic static boolean getBoolean(java.lang.String prompt, java.lang.String trueText, java.lang.String falseText)
prompt
- message to appear in dialogtrueText
- message to appear on true "button"falseText
- message to appear on "false" buttonpublic static boolean getBoolean(java.lang.String prompt)
prompt
- message to appear in dialogpublic static int getInt(java.lang.String prompt)
prompt
- the message string to be displayed inside dialogpublic static float getFloat(java.lang.String prompt)
prompt
- the message string to be displayed inside dialogpublic static double getDouble(java.lang.String prompt)
prompt
- the message string to be displayed inside dialogpublic static void output(java.lang.String content, java.lang.String title)
content
- the string to be displayedtitle
- the title of the display windowpublic static void outputEnd(java.lang.String content, java.lang.String title)
content
- the string to be displayedtitle
- the title of the display window