public class UIAuxiliaryMethods
extends java.lang.Object
Constructor and Description |
---|
UIAuxiliaryMethods() |
Modifier and Type | Method and Description |
---|---|
static boolean |
askUserForBoolean(java.lang.String question)
Shows a pop-up window in which the user can choose Yes or No.
|
static java.lang.String |
askUserForChoice(java.lang.String question,
java.lang.String... options)
Shows a pop-up window with a drop down menu of choices.
|
static void |
askUserForInput() |
static java.lang.String |
askUserForString(java.lang.String question)
Shows a pop-up window in which the user can provide input.
|
static int |
getRandom(int from,
int to)
Returns a random number in the interval, [from,to).
|
static void |
showMessage(java.lang.String message)
Shows a message in a pop-up window.
|
public static int getRandom(int from, int to)
from
- The start of the intervalto
- The end of the interval, non-inclusive.public static void showMessage(java.lang.String message)
message
- The message to be shown.public static java.lang.String askUserForString(java.lang.String question)
question
- The question to be shown.public static boolean askUserForBoolean(java.lang.String question)
question
- The question to be shown.public static java.lang.String askUserForChoice(java.lang.String question, java.lang.String... options)
question
- The question posed to the user.options
- The option the user can choose from.public static void askUserForInput()