Enum Theme

  • All Implemented Interfaces:
    Serializable, Comparable<Theme>

    public enum Theme
    extends Enum<Theme>
    Glisten user interfaces can be themed either in a 'light' or a 'dark' style, depending on your user interface requirements. Based on your selection, the rest of the user interface will appropriately style itself (in conjunction with your chosen Swatch).
    Since:
    1.0.0
    See Also:
    Swatch
    • Enum Constant Detail

      • LIGHT

        public static final Theme LIGHT
      • DARK

        public static final Theme DARK
    • Method Detail

      • values

        public static Theme[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Theme c : Theme.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Theme valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • assignTo

        public void assignTo​(Scene scene)
        Call this method to apply the selected theme to the given Scene.
        Parameters:
        scene - The scene on which to apply the selected theme.
      • getDefault

        public static Theme getDefault()
        Returns the hardcoded default theme - light.
        Returns:
        The hardcoded default theme - light.