Package net.sf.okapi.common
Class UserPrompt
- java.lang.Object
-
- net.sf.okapi.common.UserPrompt
-
- All Implemented Interfaces:
IUserPrompt
public class UserPrompt extends Object implements IUserPrompt
A CLI implementation ofIUserPrompt.
-
-
Constructor Summary
Constructors Constructor Description UserPrompt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(Object uiParent, String title)Initialize the prompt.booleanpromptOKCancel(String message)Prompt the user to decide between "OK" and "Cancel".booleanpromptYesNoCancel(String message)Prompt the user to decide between "Yes", "No", and "Cancel".
-
-
-
Method Detail
-
initialize
public void initialize(Object uiParent, String title)
Description copied from interface:IUserPromptInitialize the prompt.- Specified by:
initializein interfaceIUserPrompt- Parameters:
uiParent- The UI parent (used in GUI mode only; can be null otherwise)title- The title of the dialog (used in GUI mode only; can be null)
-
promptYesNoCancel
public boolean promptYesNoCancel(String message) throws OkapiUserCanceledException
Description copied from interface:IUserPromptPrompt the user to decide between "Yes", "No", and "Cancel".- Specified by:
promptYesNoCancelin interfaceIUserPrompt- Parameters:
message- The text message to display- Returns:
- true if yes, false if no
- Throws:
OkapiUserCanceledException- If user cancels
-
promptOKCancel
public boolean promptOKCancel(String message) throws OkapiUserCanceledException
Description copied from interface:IUserPromptPrompt the user to decide between "OK" and "Cancel".- Specified by:
promptOKCancelin interfaceIUserPrompt- Parameters:
message- The text message to display- Returns:
- true if OK
- Throws:
OkapiUserCanceledException- If user cancels
-
-