public class StoppableInput
extends java.lang.Object
Constructor and Description |
---|
StoppableInput() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDirectory(java.lang.String message)
Method to get the name of a directory
|
static java.lang.Integer |
getIntNumber(java.lang.String message)
Method to allow the user to input an integer.
|
static java.lang.Integer |
getIntNumber(java.lang.String message,
int min,
int max)
Method to get an integer between a minimum
and maximum (inclusive)
|
static java.lang.Double |
getNumber(java.lang.String message)
Method to allow the user to input a number.
|
static java.lang.String |
getString(java.lang.String message)
Method to get a string input by the user.
|
static void |
setThingToStop(Stoppable thing)
Sets the thing that will be stopped by the "Stop" buttons on these
dialog boxes.
|
public static void setThingToStop(Stoppable thing)
thing
- The thing to stop, or null to disable the stop buttons.public static java.lang.Double getNumber(java.lang.String message)
message
- the message to display to the user in the dialogpublic static java.lang.Integer getIntNumber(java.lang.String message)
message
- the message to display to the user in the dialogpublic static java.lang.Integer getIntNumber(java.lang.String message, int min, int max)
message
- the message to display to the user in the dialogmin
- the minimum numbermax
- the maximum numberpublic static java.lang.String getDirectory(java.lang.String message)
message
- the message to display to the userpublic static java.lang.String getString(java.lang.String message)
message
- the message to display to the user