|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.webrenderer.se.event.PromptEvent
public class PromptEvent
An event which indicates that the browser is about to show a dialog.
Currently, a PromptEvent
will be invoked in an
IMozillaBrowserCanvas
for any dialog shown, and in an
IIEBrowserCanvas
for javascript alert dialogs.
If getDialogType() == PromptEvent.AllowPromptUsernameAndPassword, then calling setUserName and SetPassword will bypass showing the dialog by using the username and password specified.
blockPromptDialog() if called will stop the dialog from showing. This shouldn't be called if you set the username and password.
To reduce the cost of multiple method invocations, the event object will record the new data pertaining to the event.
Field Summary | |
---|---|
static int |
AlertCheck
Allows an alert dialog with an OK button and |
static int |
AllowAlert
Allows an alert dialog with an OK button. |
static int |
AllowConfirm
Allows a dialog with OK and Cancel buttons. |
static int |
AllowConfirmCheck
Allows a dialog with OK and Cancel buttons |
static int |
AllowConfirmEx
Allows a dialog with up to 3 buttons and an optional checkbox. |
static int |
AllowPrompt
Allows a dialog with an edit field and an optional checkbox. |
static int |
AllowPromptPassword
Allows a dialog with a password field and an optional checkbox. |
static int |
AllowPromptUsernameAndPassword
Allows a dialog with an edit field, a password field, and an optional checkbox. |
protected boolean |
bCheckValue
|
static int |
BUTTON_CANCEL
Constant representing CANCEL button. |
static int |
BUTTON_NO
Constant representing NO button. |
static int |
BUTTON_OK
Constant representing OK button. |
static int |
BUTTON_YES
Constant representing YES button. |
protected int |
DialogType
|
protected int |
iResult
|
protected java.lang.String |
password
|
protected boolean |
result
|
protected java.lang.String |
strDialogText
|
protected java.lang.String |
strDialogTitle
|
protected java.lang.String |
userName
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
PromptEvent(java.lang.Object source,
int DlgType)
Constructor for PromptEvent with a source. |
|
PromptEvent(java.lang.Object source,
int DlgType,
java.lang.String DialogTitle,
java.lang.String DialogText)
|
Method Summary | |
---|---|
void |
blockPromptDialog()
Stops the dialog associated with this event from being shown. |
boolean |
getBlockPromptDialog()
|
int |
getButtonResult()
Returns the Result; |
boolean |
getCheckValue()
Returns the Check Value; |
java.lang.String |
getDialogText()
Returns the Dialog Text; |
java.lang.String |
getDialogTitle()
Returns the Dialog Title. |
int |
getDialogType()
Returns the DialogType. |
java.lang.String |
getPassword()
|
java.lang.String |
getUserName()
|
void |
setButtonResult(int iVal)
Sets the button that should be pressed. |
void |
setCheckValue(boolean bVal)
Sets the Check Value |
void |
setDialogType(int dlgtype)
Sets the DialogType. |
void |
setPassword(java.lang.String string)
Sets the password for the prompt |
void |
setPromptText(java.lang.String string)
Sets the textfield text for the prompt |
void |
setUserName(java.lang.String string)
Sets the username for the prompt |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int AllowAlert
public static final int AlertCheck
public static final int AllowConfirm
public static final int AllowConfirmCheck
public static final int AllowConfirmEx
public static final int AllowPromptPassword
public static final int AllowPromptUsernameAndPassword
public static final int AllowPrompt
public static final int BUTTON_OK
public static final int BUTTON_CANCEL
public static final int BUTTON_YES
public static final int BUTTON_NO
protected int DialogType
protected boolean result
protected java.lang.String userName
protected java.lang.String password
protected java.lang.String strDialogTitle
protected boolean bCheckValue
protected java.lang.String strDialogText
protected int iResult
Constructor Detail |
---|
public PromptEvent(java.lang.Object source, int DlgType)
EventObject.EventObject(Object)
public PromptEvent(java.lang.Object source, int DlgType, java.lang.String DialogTitle, java.lang.String DialogText)
Method Detail |
---|
public void blockPromptDialog()
public boolean getBlockPromptDialog()
public int getDialogType()
public void setDialogType(int dlgtype)
dlgtype
- The DialogType to setpublic java.lang.String getPassword()
public java.lang.String getUserName()
public void setPassword(java.lang.String string)
string
- public void setUserName(java.lang.String string)
string
- public void setPromptText(java.lang.String string)
string
- public java.lang.String getDialogTitle()
public java.lang.String getDialogText()
public boolean getCheckValue()
public void setCheckValue(boolean bVal)
public int getButtonResult()
public void setButtonResult(int iVal)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |