Class UIUtils

java.lang.Object
io.jans.casa.ui.UIUtils

public final class UIUtils extends Object
Utility class to show auto-dismiss notification success/error ZK notification boxes.
Author:
jgomer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Duration (in ms) used for auto-dismiss in error messages.
    static final int
    Duration (in ms) used for auto-dismiss in successful messages.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    showMessageUI(boolean success)
    Shows a notification box with a generic success or error message.
    static void
    showMessageUI(boolean success, String msg)
    Shows a notification box with the supplied success or error message, in the middle of the screen.
    static void
    showMessageUI(boolean success, String msg, String position)
    Shows a notification box with the supplied success or error message, in the position passed in the parameter.
    static void
    showMessageUI(String notificationType, String msg)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FEEDBACK_DELAY_SUCC

      public static final int FEEDBACK_DELAY_SUCC
      Duration (in ms) used for auto-dismiss in successful messages.
      See Also:
    • FEEDBACK_DELAY_ERR

      public static final int FEEDBACK_DELAY_ERR
      Duration (in ms) used for auto-dismiss in error messages.
      See Also:
  • Method Details

    • showMessageUI

      public static void showMessageUI(boolean success)
      Shows a notification box with a generic success or error message.
      Parameters:
      success - Whether to use the success or error message
    • showMessageUI

      public static void showMessageUI(boolean success, String msg)
      Shows a notification box with the supplied success or error message, in the middle of the screen.
      Parameters:
      success - Whether to use the success or error message
      msg - Message to show inside the box
    • showMessageUI

      public static void showMessageUI(boolean success, String msg, String position)
      Shows a notification box with the supplied success or error message, in the position passed in the parameter.
      Parameters:
      success - Whether to use the success or error message
      msg - Message to show inside the box
      position - A string indicating the position (for a list of possible values see "useful Java utilities" in ZK developer's reference manual)
    • showMessageUI

      public static void showMessageUI(String notificationType, String msg)