| java.lang.Object com.sun.jump.executive.JUMPUserInputManager
JUMPUserInputManager | abstract public class JUMPUserInputManager (Code) | | JUMPUserInputManager defines methods that allow JUMP
modules to request user feedback as part of their functionality. Examples
that need user feedback are asking the user if a particular application
can be downloaded or not. The implementation of the manager can present
an appropriate User Interface (GUI or CLI) to get the user feedback.
An instance of JUMPUserInputManager is got from
JUMPExecutive.getUserInputManager
All the methods block till the user performs some action with the UI
presented. All the strings that are passed as arguments that are shown by
the dialog MUST be a localized string. The implementation of the API will
simply render those strings.
The following sample code shows how the download module can ask the
user whether to allow installing an unsigned application.
public boolean allowUnsignedApp() {
JUMPExecutive executive = JUMPExecutive.getInstance();
JUMPUserInputManager uiManager = executive.getUserInputManager();
return uiManager.showDialog("Allow installing of unsigned app ..."
"OK",
"Cancel");
}
|
Method Summary | |
abstract public String[] | showChoices(String title, URL imageURL, String[] choices, String[] defaultChoices, boolean isMultiSelection, String okString, String cancelString) Show the message in a dialog and wait for the user to select
OK or Cancel and return the user selection.
Parameters: title - the message to be displayed in the choice box Parameters: choices - a list of strings to show as the choices for the userto select Parameters: defaultChoices - a list of strings (typically a subset ofchoices) that should be selected as the default choice. Parameters: isMultiSelection - indicates if the user can select one or morechoices. Parameters: okString - the string that is used to display the OK action. | abstract public boolean | showDialog(String message, URL imageURL, String okString, String cancelString) Show the message in a dialog and wait for the user to select
OK or Cancel and return the user selection.
Parameters: message - the message to be displayed in the dialog box Parameters: okString - the string that is used to display the OK action. |
JUMPUserInputManager | protected JUMPUserInputManager()(Code) | | Creates a new instance of JUMPUserInputManager
|
showChoices | abstract public String[] showChoices(String title, URL imageURL, String[] choices, String[] defaultChoices, boolean isMultiSelection, String okString, String cancelString)(Code) | | Show the message in a dialog and wait for the user to select
OK or Cancel and return the user selection.
Parameters: title - the message to be displayed in the choice box Parameters: choices - a list of strings to show as the choices for the userto select Parameters: defaultChoices - a list of strings (typically a subset ofchoices) that should be selected as the default choice. Parameters: isMultiSelection - indicates if the user can select one or morechoices. Parameters: okString - the string that is used to display the OK action. Parameters: cancelString - the string that is used to display the OK action. null if the user pressed cancel or dismissed the choice box or thelist of choices the user selected, which can have one or moreitems depending on the multiselection option. |
showDialog | abstract public boolean showDialog(String message, URL imageURL, String okString, String cancelString)(Code) | | Show the message in a dialog and wait for the user to select
OK or Cancel and return the user selection.
Parameters: message - the message to be displayed in the dialog box Parameters: okString - the string that is used to display the OK action. Parameters: cancelString - the string that is used to display the OK action. true if the user pressed OK and false if the user pressed cancel or dismissed the dialog. |
|
|