edu.stanford.rsl.jpop.utils
Class UserUtil

java.lang.Object
  extended by edu.stanford.rsl.jpop.utils.UserUtil

public abstract class UserUtil
extends java.lang.Object

Class for obtaining information from the user easily.

Author:
akmaier

Constructor Summary
UserUtil()
           
 
Method Summary
static java.lang.Object chooseObject(java.lang.String message, java.lang.String messageTitle, java.lang.Object[] objects, java.lang.Object initialObject)
          Asks the User to select an Object from a given array of Objects.
static boolean queryBoolean(java.lang.String message)
          Queries the User for a Boolean value.
static double queryDouble(java.lang.String message, double initialValue)
          Queries the User for a Double values using Swing.
static int queryInt(java.lang.String message, int initialValue)
          Queries the User for an Integer value using Swing.
static java.lang.String queryString(java.lang.String message, java.lang.String initialValue)
          Queries the User for a String value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserUtil

public UserUtil()
Method Detail

queryInt

public static int queryInt(java.lang.String message,
                           int initialValue)
                    throws java.lang.Exception
Queries the User for an Integer value using Swing.

Parameters:
message -
initialValue -
Returns:
Throws:
java.lang.Exception

queryDouble

public static double queryDouble(java.lang.String message,
                                 double initialValue)
                          throws java.lang.Exception
Queries the User for a Double values using Swing.

Parameters:
message -
initialValue -
Returns:
Throws:
java.lang.Exception

queryString

public static java.lang.String queryString(java.lang.String message,
                                           java.lang.String initialValue)
                                    throws java.lang.Exception
Queries the User for a String value.

Parameters:
message -
initialValue -
Returns:
Throws:
java.lang.Exception

queryBoolean

public static boolean queryBoolean(java.lang.String message)
                            throws java.lang.Exception
Queries the User for a Boolean value.

Parameters:
message -
Returns:
Throws:
java.lang.Exception

chooseObject

public static java.lang.Object chooseObject(java.lang.String message,
                                            java.lang.String messageTitle,
                                            java.lang.Object[] objects,
                                            java.lang.Object initialObject)
                                     throws java.lang.Exception
Asks the User to select an Object from a given array of Objects.

Parameters:
message -
messageTitle -
objects -
initialObject -
Returns:
Throws:
java.lang.Exception