com.teamdev.jxbrowser.prompt
Class DefaultPromptService

java.lang.Object
  extended by com.teamdev.jxbrowser.prompt.DefaultPromptService
All Implemented Interfaces:
PromptService

public class DefaultPromptService
extends java.lang.Object
implements PromptService

Represents a default implementation of PromptService that only displays appropriate UI Swing dialogs.


Constructor Summary
DefaultPromptService()
           
 
Method Summary
 void alertRequested(DialogParams params)
          Displays Java message dialog with appropriate title and message.
 CloseStatus badCertificateRequested(DialogParams params)
          Displays Java confirmation dialog with appropriate title and message.
 CloseStatus confirmationRequested(DialogParams params)
          Displays Java confirmation dialog with appropriate title and message.
 CloseStatus loginRequested(LoginParams params)
          Displays login and password input dialog with appropriate title, message and predefined login and password.
 CloseStatus promptRequested(PromptDialogParams params)
          Displays Java input dialog with appropriate title, message and default text field value.
 CloseStatus scriptErrorRequested(ScriptErrorParams params)
          Displays Java confirmation dialog with appropriate title and message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPromptService

public DefaultPromptService()
Method Detail

alertRequested

public void alertRequested(DialogParams params)
Displays Java message dialog with appropriate title and message.

Specified by:
alertRequested in interface PromptService
Parameters:
params - the alert dialog parameters.

promptRequested

public CloseStatus promptRequested(PromptDialogParams params)
Displays Java input dialog with appropriate title, message and default text field value.

Specified by:
promptRequested in interface PromptService
Parameters:
params - the prompt dialog parameters.
Returns:
the selected dialog option and result user's input (meaning the user not canceled the input).

confirmationRequested

public CloseStatus confirmationRequested(DialogParams params)
Displays Java confirmation dialog with appropriate title and message.

Specified by:
confirmationRequested in interface PromptService
Parameters:
params - the confirmation dialog parameters.
Returns:
the selected dialog option.

loginRequested

public CloseStatus loginRequested(LoginParams params)
Displays login and password input dialog with appropriate title, message and predefined login and password.

Specified by:
loginRequested in interface PromptService
Parameters:
params - the authentication dialog parameters.
Returns:
the selected dialog option.

badCertificateRequested

public CloseStatus badCertificateRequested(DialogParams params)
Displays Java confirmation dialog with appropriate title and message.

Specified by:
badCertificateRequested in interface PromptService
Parameters:
params - the dialog parameters.
Returns:
the selected dialog option.

scriptErrorRequested

public CloseStatus scriptErrorRequested(ScriptErrorParams params)
Displays Java confirmation dialog with appropriate title and message.

Specified by:
scriptErrorRequested in interface PromptService
Parameters:
params - the JavaScript error dialog parameters.
Returns:
the selected dialog option.