net.sf.okapi.common

## Class UserPrompt

- java.lang.Object
- - net.sf.okapi.common.UserPrompt

- All Implemented Interfaces:
    IUserPrompt

      public class UserPrompt
      extends java.lang.Object
      implements IUserPrompt

  A CLI implementation of `IUserPrompt`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserPrompt()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(java.lang.Object uiParent, java.lang.String title)` Initialize the prompt.
    `boolean` | `promptOKCancel(java.lang.String message)` Prompt the user to decide between "OK" and "Cancel".
    `boolean` | `promptYesNoCancel(java.lang.String message)` Prompt the user to decide between "Yes", "No", and "Cancel".

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UserPrompt

          public UserPrompt()

  - ### Method Detail

    - #### initialize

          public void initialize(java.lang.Object uiParent,
                                 java.lang.String title)

      Description copied from interface: `IUserPrompt`
      Initialize the prompt.
      Specified by:
        `initialize` in interface `IUserPrompt`
      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(java.lang.String message)
                                    throws OkapiUserCanceledException

      Description copied from interface: `IUserPrompt`
      Prompt the user to decide between "Yes", "No", and "Cancel".
      Specified by:
        `promptYesNoCancel` in interface `IUserPrompt`
      Parameters:
        `message` - The text message to display
      Returns:
        true if yes, false if no
      Throws:
        `OkapiUserCanceledException` - If user cancels

    - #### promptOKCancel

          public boolean promptOKCancel(java.lang.String message)
                                 throws OkapiUserCanceledException

      Description copied from interface: `IUserPrompt`
      Prompt the user to decide between "OK" and "Cancel".
      Specified by:
        `promptOKCancel` in interface `IUserPrompt`
      Parameters:
        `message` - The text message to display
      Returns:
        true if OK
      Throws:
        `OkapiUserCanceledException` - If user cancels