es.gob.fnmt.gui

## Class PasswordUI

- java.lang.Object
- - es.gob.fnmt.gui.PasswordUI

- All Implemented Interfaces:
    DialogUIHandler

      public final class PasswordUI
      extends java.lang.Object
      implements DialogUIHandler

  Internal dialog to manage de password of the keystore.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PasswordUI(android.content.Context context, boolean cachePIN)` Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static android.content.Context` | `getAppContext()` Return application context.
    `static void` | `setAppContext(android.content.Context context)` Set application context.
    `void` | `setBackgroundColor(int color)` Set background color for layout of the dialog.
    `void` | `setBackgroundColor(java.lang.String color)` Set background color for layout of the dialog.
    `static void` | `setPasswordDialog(DialogUIHandler passwordDialog)` Set the dialog that will be shown in the PIN request.
    `void` | `setTextColor(int color)` Set text color for the text component of the dialog.
    `void` | `setTextColor(java.lang.String color)` Set text color for the text component of the dialog.
    `void` | `setTextTypeFace(android.graphics.Typeface typeFace)` Set resource TypeFace for the text component of the dialog.
    `int` | `showConfirmDialog(java.lang.String message)` Show the dialog requesting user confirmation.
    `char[]` | `showPasswordDialog(int retries)` Show the dialog requesting the password.

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

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

- - ### Constructor Detail

    - #### PasswordUI

          public PasswordUI(android.content.Context context,
                            boolean cachePIN)

      Constructor.
      Parameters:
        `context` - application context.
        `cachePIN` - if the PIN must be cached for subsequent operations.

  - ### Method Detail

    - #### setPasswordDialog

          public static void setPasswordDialog(DialogUIHandler passwordDialog)

      Set the dialog that will be shown in the PIN request.
      Parameters:
        `passwordDialog` - instance of the class that implements DialogUIHandler interface.

    - #### showConfirmDialog

          public int showConfirmDialog(java.lang.String message)

      Description copied from interface: `DialogUIHandler`
      Show the dialog requesting user confirmation.
      Specified by:
        `showConfirmDialog` in interface `DialogUIHandler`
      Parameters:
        `message` - message to show.
      Returns:
        `0` if user accepts or `1` if not.

    - #### showPasswordDialog

          public char[] showPasswordDialog(int retries)

      Description copied from interface: `DialogUIHandler`
      Show the dialog requesting the password.
      Specified by:
        `showPasswordDialog` in interface `DialogUIHandler`
      Parameters:
        `retries` - number of retries left.
      Returns:
        the password.

    - #### getAppContext

          public static android.content.Context getAppContext()

      Return application context.
      Returns:
        Context.

    - #### setAppContext

          public static void setAppContext(android.content.Context context)

      Set application context.
      Parameters:
        `context` - Context of the application.

    - #### setBackgroundColor

          public void setBackgroundColor(int color)

      Set background color for layout of the dialog.
      Parameters:
        `color` - int value in the form 0xAARRGGBB.

    - #### setBackgroundColor

          public void setBackgroundColor(java.lang.String color)

      Set background color for layout of the dialog.
      Parameters:
        `color` - string name of the color.

    - #### setTextColor

          public void setTextColor(int color)

      Set text color for the text component of the dialog.
      Parameters:
        `color` - int value in the form 0xAARRGGBB.

    - #### setTextColor

          public void setTextColor(java.lang.String color)

      Set text color for the text component of the dialog.
      Parameters:
        `color` - string name of the color.

    - #### setTextTypeFace

          public void setTextTypeFace(android.graphics.Typeface typeFace)

      Set resource TypeFace for the text component of the dialog.
      Parameters:
        `typeFace` - typeFace instance.