org.mozilla.webclient
Interface Prompt


public interface Prompt

The custom app must implement this interface in order to supply the underlying browser with basic authentication behavior. The custom app must tell webclient about its Prompt implementation by calling Navigation.setPrompt(). This must be done FOR EACH BrowserControl instance!


Field Summary
static java.lang.String BUTTON_PRESSED_KEY
           
static java.lang.String CHECKBOX_STATE_KEY
           
static java.lang.String EDIT_FIELD_1_KEY
           
static java.lang.String EDIT_FIELD_2_KEY
           
static java.lang.String PASSWORD_KEY
           
static java.lang.String USER_NAME_KEY
           
 
Method Summary
 boolean promptUsernameAndPassword(java.lang.String dialogTitle, java.lang.String text, java.lang.String passwordRealm, int savePassword, java.util.Properties fillThis)
          Puts up a username/password dialog with OK and Cancel buttons.
 boolean universalDialog(java.lang.String titleMessage, java.lang.String dialogTitle, java.lang.String text, java.lang.String checkboxMsg, java.lang.String button0Text, java.lang.String button1Text, java.lang.String button2Text, java.lang.String button3Text, java.lang.String editfield1Msg, java.lang.String editfield2Msg, int numberButtons, int numberEditfields, boolean editField1Password, java.util.Properties fillThis)
          Tells the custom app to put up a modal dialog using the information in the params for the dialog ui.
 

Field Detail

USER_NAME_KEY

static final java.lang.String USER_NAME_KEY
See Also:
Constant Field Values

PASSWORD_KEY

static final java.lang.String PASSWORD_KEY
See Also:
Constant Field Values

EDIT_FIELD_1_KEY

static final java.lang.String EDIT_FIELD_1_KEY
See Also:
Constant Field Values

EDIT_FIELD_2_KEY

static final java.lang.String EDIT_FIELD_2_KEY
See Also:
Constant Field Values

CHECKBOX_STATE_KEY

static final java.lang.String CHECKBOX_STATE_KEY
See Also:
Constant Field Values

BUTTON_PRESSED_KEY

static final java.lang.String BUTTON_PRESSED_KEY
See Also:
Constant Field Values
Method Detail

promptUsernameAndPassword

boolean promptUsernameAndPassword(java.lang.String dialogTitle,
                                  java.lang.String text,
                                  java.lang.String passwordRealm,
                                  int savePassword,
                                  java.util.Properties fillThis)
Puts up a username/password dialog with OK and Cancel buttons.

Parameters:
fillThis - a pre-allocated properties object that the callee fills in. keys: userName, password
Returns:
true for OK, false for Cancel

universalDialog

boolean universalDialog(java.lang.String titleMessage,
                        java.lang.String dialogTitle,
                        java.lang.String text,
                        java.lang.String checkboxMsg,
                        java.lang.String button0Text,
                        java.lang.String button1Text,
                        java.lang.String button2Text,
                        java.lang.String button3Text,
                        java.lang.String editfield1Msg,
                        java.lang.String editfield2Msg,
                        int numberButtons,
                        int numberEditfields,
                        boolean editField1Password,
                        java.util.Properties fillThis)
Tells the custom app to put up a modal dialog using the information in the params for the dialog ui.

keys:

editfield1Value
initial and final value for first edit field
editfield2Value
initial and final value for second edit field
checkboxState
initial and final state of checkbox: true or false
buttonPressed
number of button that was pressed (0 to 3)

Parameters:
titleMessage -
dialogTitle - e.g., alert, confirm, prompt, prompt password
text - main message for dialog
checkboxMsg - message for checkbox
button0Text - text for first button
button1Text - text for second button
button2Text - text for third button
button3Text - text for fourth button
editfield1Msg - message for first edit field
editfield2Msg - message for second edit field
numberButtons - total number of buttons (0 to 4)
numberEditfields - total number of edit fields (0 to 2)
editField1Password - whether or not editField1 is a password
fillThis - the properties object to be filled with the above keys


Copyright © 2002-2007 Mozilla.org All Rights Reserved.