Methods Summary |
---|
public void | allowEmptyInput(boolean empty_input)Indicates whether blank input can be entered.
|
public java.lang.String | getSubmittedInput()Returns the string if the user submitted any data - you should check
for this by calling {@link #hasSubmittedInput()} first.
|
public boolean | hasSubmittedInput()Returns true if the user submitted any data.
|
public void | maintainWhitespace(boolean keep_whitespace)Indicates whether to keep whitespace are kept when input is entered,
or whether to strip it out. Default behaviour is to strip whitespace.
|
public void | prompt()This prompts the user for input. This method will not return until
the user has either entered valid input, or signalled they want to
cancel entering any data.
|
public void | setInputValidator(UIInputValidator validator)Sets the UIInputValidator for this object. This allows an external
object to validate or reject input submitted by the user.
By default, there is no input validator associated with a
UIInputReceiver, meaning all input is allowed.
|
public void | setLocalisedMessage(java.lang.String message)Sets the message to display for the text entry input. This will
normally be displayed near the position where the text will be
entered - this method is usually used to present the user with
an indication of what to enter.
For multiple lines, see {@link #setLocalisedMessages}.
|
public void | setLocalisedMessages(java.lang.String[] messages)Sets the message to display for the text entry input. This will
normally be displayed near the position where the text will be
entered - this method is usually used to present the user with
an indication of what to enter.
The value passed here will be an array of strings - each string
will be usually outputted on its own line. The last value in
the array will usually be the message displayed closest to the
users prompt.
|
public void | setLocalisedTitle(java.lang.String title)Sets the title for the text entry input. For some interfaces, this
means that a window will be presented, and the title of the window
will be the value passed here.
|
public void | setMessage(java.lang.String message)Sets the message to display for the text entry input. This will
normally be displayed near the position where the text will be
entered - this method is usually used to present the user with
an indication of what to enter.
For multiple lines, see {@link #setMessages}.
|
public void | setMessages(java.lang.String[] messages)Sets the message to display for the text entry input. This will
normally be displayed near the position where the text will be
entered - this method is usually used to present the user with
an indication of what to enter.
The value passed here will be an array of strings - each string
will be usually outputted on its own line. The last value in
the array will usually be the message displayed closest to the
users prompt.
|
public void | setMultiLine(boolean multiline)Indicates whether to allow multi-line input.
Default behaviour is to not allow multiple lines.
|
public void | setPreenteredText(java.lang.String text, boolean as_suggested)This sets a value to be displayed as pre-entered text for the
input. This may be called if the caller wants to suggest a
value for the user to use, or if the caller wants to provide
a previous value (for example).
The text may appear in the same location as the text should
be entered (allowing it to be directly overwritten or submitted
immediately) - but some interfaces may not support this.
A flag should be passed indicating whether the pre-entered text
is being entered as a suggestion for a value, or whether it is
an old value being currently stored. Some interfaces may choose
to differentiate between the two.
|
public void | setTitle(java.lang.String title)Sets the title for the text entry input. For some interfaces, this
means that a window will be presented, and the title of the window
will be the value passed here.
|