org.crosswire.jsword.util

## Class WebWarning

- java.lang.Object
- - org.crosswire.jsword.util.WebWarning

-     public final class WebWarning
      extends Object

  Provide a configurable warning that the Internet is going to be accessed. This is important in places where Internet activity may be monitored and Christians may be persecuted.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static boolean` | `DEFAULT_SHOWN`
    `private static WebWarning` | `instance`
    `private static org.slf4j.Logger` | `log` The log stream
    `private boolean` | `shown`
    `private static String` | `SHOWN_KEY`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `WebWarning()` This is a utility class, thus it's constructor is private.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getShownWarningLabel()`
    `String` | `getWarning()`
    `static WebWarning` | `instance()` All access to WebWarning is through this single instance.
    `boolean` | `isShown()`
    `static boolean` | `isWarningShown()`
    `void` | `setShown(boolean newShown)`
    `static void` | `setWarningShown(boolean newShown)` From configuration set the state.

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

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

- - ### Field Detail

    - #### instance

          private static WebWarning instance

    - #### SHOWN_KEY

          private static final String SHOWN_KEY

      See Also:
        Constant Field Values

    - #### DEFAULT_SHOWN

          private static final boolean DEFAULT_SHOWN

      See Also:
        Constant Field Values

    - #### shown

          private boolean shown

    - #### log

          private static final org.slf4j.Logger log

      The log stream

  - ### Constructor Detail

    - #### WebWarning

          private WebWarning()

      This is a utility class, thus it's constructor is private.

  - ### Method Detail

    - #### instance

          public static WebWarning instance()

      All access to WebWarning is through this single instance.
      Returns:
        the singleton instance

    - #### setShown

          public void setShown(boolean newShown)

      Parameters:
        `newShown` - Whether this WebWarning should be shown.

    - #### isShown

          public boolean isShown()

      Returns:
        Whether this WebWarning should be shown.

    - #### setWarningShown

          public static void setWarningShown(boolean newShown)

      From configuration set the state.
      Parameters:
        `newShown` - Whether this WebWarning should be shown.

    - #### isWarningShown

          public static boolean isWarningShown()

      Returns:
        Whether this WebWarning should be shown.

    - #### getWarning

          public String getWarning()

      Returns:
        a warning that the Internet is about to be accessed

    - #### getShownWarningLabel

          public String getShownWarningLabel()

      Returns:
        indicate that the warning will be shown again