Enum Class UISchemes.Mode

java.lang.Object
java.lang.Enum<UISchemes.Mode>
com.iizix.prop.ui.device.UISchemes.Mode
All Implemented Interfaces:
Serializable, Comparable<UISchemes.Mode>, Constable
Enclosing class:
UISchemes

public static enum UISchemes.Mode extends Enum<UISchemes.Mode>
The modes: light, dark, or auto that follows the OS (ruled Q6, R6).
Author:
Christopher Mindus
  • Enum Constant Details

    • LIGHT

      public static final UISchemes.Mode LIGHT
      The light member of the family.
    • DARK

      public static final UISchemes.Mode DARK
      The dark member of the family.
    • AUTO

      public static final UISchemes.Mode AUTO
      Follow the OS: light or dark as the device says, listening for changes; light when the system cannot tell. The name auto_light is an alias of this mode.
    • AUTO_DARK

      public static final UISchemes.Mode AUTO_DARK
      Follow the OS, dark when the system cannot tell.
  • Field Details

    • AUTO_LIGHT_ALIAS

      public static final String AUTO_LIGHT_ALIAS
      The alias of AUTO: auto with light as the fallback, spelled out.
      See Also:
    • name

      public final String name
      The name, as the CSS attribute data-iz-mode carries it (light or dark; auto is resolved by the client).
    • description

      public final String description
      The description shown in the Designer.
  • Method Details

    • values

      public static UISchemes.Mode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UISchemes.Mode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public static UISchemes.Mode get(String name)
      Gets a mode from its name, AUTO_LIGHT_ALIAS giving AUTO.
      Parameters:
      name - The name.
      Returns:
      The mode, or null if not found.
    • isAuto

      public boolean isAuto()
      Checks if this mode follows the OS.
      Returns:
      true for AUTO and AUTO_DARK, false for light and dark.
    • getFallback

      public UISchemes.Mode getFallback()
      Gets the mode a page shows when the system cannot tell: the fallback of an auto mode, the mode itself otherwise.
      Returns:
      LIGHT or DARK.