com.ibm.notes.java.ui.prompt
Class Prompt

java.lang.Object
  extended by com.ibm.notes.java.ui.prompt.Prompt

public class Prompt
extends Object

The Prompt class facilitates the ability to ask the user for several types of input.


Field Summary
static int PROMPT_CHOOSEDATABASE
          Integer value of the Choose Database Prompt type.
static int PROMPT_OK
          Integer value of the OK Prompt type.
static int PROMPT_OKCANCELCOMBO
          Integer value of the OK Cancel Prompt With Combo Box type.
static int PROMPT_OKCANCELEDIT
          Integer value of the OK Cancel Edit Prompt type.
static int PROMPT_OKCANCELEDITCOMBO
          Integer value of the OK Cancel Prompt With Editable Combo Box type.
static int PROMPT_OKCANCELLIST
          Integer value of the OK Cancel Prompt With List Box type.
static int PROMPT_OKCANCELLISTMULT
          Integer value of the OK Cancel Prompt With Multi-Selectable List Box type.
static int PROMPT_PASSWORD
          Integer value of the Password Prompt type.
static int PROMPT_YESNO
          Integer value of the Yes No Prompt type.
static int PROMPT_YESNOCANCEL
          Integer value of the Yes No Cancel Prompt type.
 
Constructor Summary
Prompt()
          Default constructor.
 
Method Summary
static NotesDatabaseData ChooseDatabase()
          Convenient choose database prompt.
static String[] ChooseDatabase(String title, String prompt)
          Open the choose database prompt.
static int Ok(String title, String prompt)
          Open an OK prompt.
static String OkCancelCombo(String title, String prompt, String defValue, String[] values)
          Open an OK Cancel prompt with a combo box.
static String OkCancelEdit(String title, String prompt, String defValue)
          Open an OK Cancel prompt with an editable text field.
static String OkCancelEditCombo(String title, String prompt, String defValue, String[] values)
          Open an OK Cancel prompt with an editable combo box.
static String OkCancelList(String title, String prompt, String defValue, String[] values)
          Open an OK Cancel prompt with a list box.
static String[] OkCancelListMulti(String title, String prompt, String[] defValue, String[] values)
          Open an OK Cancel prompt with a multi-selectable list box.
static String Password(String title, String prompt)
          Open a password prompt.
static Object prompt(int type, String title, String prompt, Object defValue, String[] values)
          Displays a dialog box and returns a value based on your actions in the dialog box.
static int YesNo(String title, String prompt)
          Open a Yes No prompt.
static int YesNoCancel(String title, String prompt)
          Open a Yes No Cancel prompt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROMPT_OK

public static final int PROMPT_OK
Integer value of the OK Prompt type.

See Also:
Constant Field Values

PROMPT_YESNO

public static final int PROMPT_YESNO
Integer value of the Yes No Prompt type.

See Also:
Constant Field Values

PROMPT_OKCANCELEDIT

public static final int PROMPT_OKCANCELEDIT
Integer value of the OK Cancel Edit Prompt type.

See Also:
Constant Field Values

PROMPT_OKCANCELLIST

public static final int PROMPT_OKCANCELLIST
Integer value of the OK Cancel Prompt With List Box type.

See Also:
Constant Field Values

PROMPT_OKCANCELCOMBO

public static final int PROMPT_OKCANCELCOMBO
Integer value of the OK Cancel Prompt With Combo Box type.

See Also:
Constant Field Values

PROMPT_OKCANCELEDITCOMBO

public static final int PROMPT_OKCANCELEDITCOMBO
Integer value of the OK Cancel Prompt With Editable Combo Box type.

See Also:
Constant Field Values

PROMPT_OKCANCELLISTMULT

public static final int PROMPT_OKCANCELLISTMULT
Integer value of the OK Cancel Prompt With Multi-Selectable List Box type.

See Also:
Constant Field Values

PROMPT_PASSWORD

public static final int PROMPT_PASSWORD
Integer value of the Password Prompt type.

See Also:
Constant Field Values

PROMPT_YESNOCANCEL

public static final int PROMPT_YESNOCANCEL
Integer value of the Yes No Cancel Prompt type.

See Also:
Constant Field Values

PROMPT_CHOOSEDATABASE

public static final int PROMPT_CHOOSEDATABASE
Integer value of the Choose Database Prompt type.

See Also:
Constant Field Values
Constructor Detail

Prompt

public Prompt()
Default constructor.

Since:
8.5.1
Method Detail

prompt

public static Object prompt(int type,
                            String title,
                            String prompt,
                            Object defValue,
                            String[] values)
Displays a dialog box and returns a value based on your actions in the dialog box.

Parameters:
type - indicates the type of dialog box that you want to display, values from the Prompt class specifies type
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
values - the values that you want displayed in the dialog box's list box, where applicable
Returns:
value selected by the user
Since:
8.5.1

ChooseDatabase

public static String[] ChooseDatabase(String title,
                                      String prompt)
Open the choose database prompt.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
Returns:
an array of databases that were selected
Since:
8.5.1

OkCancelListMulti

public static String[] OkCancelListMulti(String title,
                                         String prompt,
                                         String[] defValue,
                                         String[] values)
Open an OK Cancel prompt with a multi-selectable list box.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
values - the values that you want displayed in the dialog box's list box
Returns:
an array of the values that were selected
Since:
8.5.1

OkCancelEditCombo

public static String OkCancelEditCombo(String title,
                                       String prompt,
                                       String defValue,
                                       String[] values)
Open an OK Cancel prompt with an editable combo box.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
values - the values that you want displayed in the dialog box's combo box
Returns:
the value that was selected
Since:
8.5.1

OkCancelCombo

public static String OkCancelCombo(String title,
                                   String prompt,
                                   String defValue,
                                   String[] values)
Open an OK Cancel prompt with a combo box.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
values - the values that you want displayed in the dialog box's combo box
Returns:
the value that was selected
Since:
8.5.1

OkCancelList

public static String OkCancelList(String title,
                                  String prompt,
                                  String defValue,
                                  String[] values)
Open an OK Cancel prompt with a list box.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
values - the values that you want displayed in the dialog box's list box
Returns:
the value that was selected
Since:
8.5.1

OkCancelEdit

public static String OkCancelEdit(String title,
                                  String prompt,
                                  String defValue)
Open an OK Cancel prompt with an editable text field.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
Returns:
the value that was inputed by the user
Since:
8.5.1

Password

public static String Password(String title,
                              String prompt)
Open a password prompt.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
Returns:
the password inputed by the user
Since:
8.5.1

YesNo

public static int YesNo(String title,
                        String prompt)
Open a Yes No prompt.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
Returns:
1 for Yes, 0 for No
Since:
8.5.1

YesNoCancel

public static int YesNoCancel(String title,
                              String prompt)
Open a Yes No Cancel prompt.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
Returns:
1 for Yes, 0 for No, -1 for Cancel
Since:
8.5.1

Ok

public static int Ok(String title,
                     String prompt)
Open an OK prompt.

Parameters:
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
Returns:
1 for OK
Since:
8.5.1

ChooseDatabase

public static NotesDatabaseData ChooseDatabase()
                                        throws NotesException 
Convenient choose database prompt.

Returns:
details about the database chosen
Throws:
NotesException - thrown when the choose database operation fails
Since:
8.5.1