ur_rna.RNAstructureUI.ui

## Class Dialogs

- java.lang.Object
- - ur_rna.RNAstructureUI.ui.Dialogs

- All Implemented Interfaces:
    java.io.Serializable

      public abstract class Dialogs
      extends java.lang.Object
      implements java.io.Serializable

  A class that handles simple dialogs used in the RNAstructure GUI.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static long` | `serialVersionUID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Dialogs()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.swing.JPanel` | `createTextPanel(java.lang.String content)`
    `private static java.lang.String` | `fmtMsg(java.lang.String message)`
    `static java.lang.Double` | `getInput(NumberField.DoubleField field)` Show an input dialog that gets a double within a certain range.
    `static java.lang.Integer` | `getInput(NumberField.IntegerField field)` Show an input dialog that gets an integer within a certain range.
    `static java.lang.String` | `getInput(java.lang.String title, java.lang.String message, java.lang.Object defaultValue)` Show an input dialog that gets a string.
    `static java.lang.String` | `htmlCenter(java.lang.String msg)` Converts a simple text message to an html-formatted message by prepending `<html><center>` and escaping all html special characters within the message.
    `static java.lang.String` | `nl2br(java.lang.String s)`
    `static java.lang.String` | `nohtml(java.lang.String msg)`
    `static boolean` | `showConfirm(java.lang.Object message)` Show a dialog that gives the user one of two choices to make.
    `static boolean` | `showConfirm(java.lang.String msg)` Show a dialog that gives the user one of two choices to make.
    `static void` | `showError(java.lang.String message)` Show an error dialog.
    `static void` | `showError(java.lang.String message, java.lang.String title)`
    `static void` | `showMessage(java.lang.String msg)` Show a message dialog using String.format to create the message.
    `static void` | `showMessage(java.lang.String format, java.lang.Object... args)` Show a message dialog using String.format to create the message.
    `static void` | `showWarning(java.awt.Component message)` Show a warning dialog.
    `static void` | `showWarning(java.lang.String message)` Show a warning dialog.
    `static void` | `showWarning(java.lang.String message, boolean scrollable)` Show a warning dialog.
    `static java.lang.String` | `showYesNoCancel(java.lang.Object message)` Show a dialog that gives the user one of three choices to make.
    `static java.lang.String` | `showYesNoCancel(java.lang.String msg)` Show a dialog that gives the user one of three choices to make.

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

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

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Dialogs

          public Dialogs()

  - ### Method Detail

    - #### createTextPanel

          public static javax.swing.JPanel createTextPanel(java.lang.String content)

    - #### fmtMsg

          private static java.lang.String fmtMsg(java.lang.String message)

    - #### getInput

          public static java.lang.Double getInput(NumberField.DoubleField field)

      Show an input dialog that gets a double within a certain range.
      Parameters:
        `field` - The double input field.
      Returns:
        The double selected from this field.

    - #### getInput

          public static java.lang.Integer getInput(NumberField.IntegerField field)

      Show an input dialog that gets an integer within a certain range.
      Parameters:
        `field` - The integer input field.
      Returns:
        The integer selected from this field.

    - #### getInput

          public static java.lang.String getInput(java.lang.String title,
                                                  java.lang.String message,
                                                  java.lang.Object defaultValue)

      Show an input dialog that gets a string.
      Parameters:
        `title` - The title (caption) on the dialog window.
      Returns:
        The new text.

    - #### htmlCenter

          public static java.lang.String htmlCenter(java.lang.String msg)

      Converts a simple text message to an html-formatted message by prepending `<html><center>` and escaping all html special characters within the message. However if the message already starts with `<html>`, it is returned as-is.
      Parameters:
        `msg` - The message to convert to HTML

    - #### nl2br

          public static java.lang.String nl2br(java.lang.String s)

    - #### nohtml

          public static java.lang.String nohtml(java.lang.String msg)

    - #### showConfirm

          public static boolean showConfirm(java.lang.Object message)

      Show a dialog that gives the user one of two choices to make.
      Parameters:
        `message` - The message on the dialog.
      Returns:
        The response: "OK" or "CANCEL".

    - #### showConfirm

          public static boolean showConfirm(java.lang.String msg)

      Show a dialog that gives the user one of two choices to make.
      Parameters:
        `msg` - The message on the dialog.
      Returns:
        The response: "OK" or "CANCEL".

    - #### showError

          public static void showError(java.lang.String message)

      Show an error dialog.
      Parameters:
        `message` - The message on the dialog.

    - #### showError

          public static void showError(java.lang.String message,
                                       java.lang.String title)

    - #### showMessage

          public static void showMessage(java.lang.String msg)

      Show a message dialog using String.format to create the message.
      Parameters:
        `msg` - The message on the dialog.

    - #### showMessage

          public static void showMessage(java.lang.String format,
                                         java.lang.Object... args)

      Show a message dialog using String.format to create the message.
      Parameters:
        `format` - The message on the dialog.
        `args` - Arguments to String.format

    - #### showWarning

          public static void showWarning(java.awt.Component message)

      Show a warning dialog.
      Parameters:
        `message` - The message on the dialog.

    - #### showWarning

          public static void showWarning(java.lang.String message)

      Show a warning dialog.
      Parameters:
        `message` - The message on the dialog.

    - #### showWarning

          public static void showWarning(java.lang.String message,
                                         boolean scrollable)

      Show a warning dialog.
      Parameters:
        `message` - The message on the dialog.

    - #### showYesNoCancel

          public static java.lang.String showYesNoCancel(java.lang.Object message)

      Show a dialog that gives the user one of three choices to make.
      Parameters:
        `message` - The message on the dialog.
      Returns:
        The response: "YES", "NO", or "CANCEL".

    - #### showYesNoCancel

          public static java.lang.String showYesNoCancel(java.lang.String msg)

      Show a dialog that gives the user one of three choices to make.
      Parameters:
        `msg` - The message on the dialog.
      Returns:
        The response: "YES", "NO", or "CANCEL".