ch.aplu.util
Class InputDialog

java.lang.Object
  |
  +--ch.aplu.util.InputDialog

public class InputDialog
extends java.lang.Object

Class to define a modal input dialog.
If the user enters a value with wrong type, the dialog will reappear


Constructor Summary
InputDialog()
          Construct dialog with default title and prompt
InputDialog(java.lang.String title, java.lang.String prompt)
          Construct dialog with given title and prompt
 
Method Summary
 java.lang.Boolean getBoolean()
          Show the dialog to get a boolean.
 java.lang.Double getDouble()
          Show the dialog to get a double value.
 java.lang.Integer getInt()
          Show the dialog to get an integer value.
 java.lang.Long getLong()
          Show the dialog to get a long value.
 java.lang.String getString()
          Show the dialog to get a string value.
 boolean readBoolean()
          Show the dialog to read a boolean.
 double readDouble()
          Show the dialog to read a double value.
 int readInt()
          Show the dialog to read an integer value.
 long readLong()
          Show the dialog to read a long value.
 java.lang.String readString()
          Show the dialog to get a string value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputDialog

public InputDialog()
Construct dialog with default title and prompt


InputDialog

public InputDialog(java.lang.String title,
                   java.lang.String prompt)
Construct dialog with given title and prompt

Method Detail

getString

public java.lang.String getString()
Show the dialog to get a string value. Synonym

Returns:
null if user pressed Cancel button
See Also:
readString

readString

public java.lang.String readString()
Show the dialog to get a string value. Synonym

Returns:
null if user pressed Cancel button
See Also:
getString

getInt

public java.lang.Integer getInt()
Show the dialog to get an integer value.

Returns:
null if user pressed Cancel button.

readInt

public int readInt()
Show the dialog to read an integer value. Redraw the dialog with empty field if Cancel is pressed


getDouble

public java.lang.Double getDouble()
Show the dialog to get a double value.

Returns:
null if user pressed Cancel button.

readDouble

public double readDouble()
Show the dialog to read a double value. Redraw the dialog with empty field if Cancel is pressed


getLong

public java.lang.Long getLong()
Show the dialog to get a long value.

Returns:
null if user pressed Cancel button.

readLong

public long readLong()
Show the dialog to read a long value. Redraw the dialog with empty field if Cancel is pressed


getBoolean

public java.lang.Boolean getBoolean()
Show the dialog to get a boolean.

Returns:
null if user pressed Cancel button.

readBoolean

public boolean readBoolean()
Show the dialog to read a boolean. Redraw the dialog with empty field if Cancel is pressed