- java.lang.Object
-
- java.lang.Enum<Theme>
-
- com.gluonhq.charm.glisten.visual.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 chosenSwatch
).- Since:
- 1.0.0
- See Also:
Swatch
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignTo(Scene scene)
Call this method to apply the selected theme to the given Scene.static Theme
getDefault()
Returns the hardcoded default theme -light
.static Theme
valueOf(String name)
Returns the enum constant of this type with the specified name.static Theme[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- 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.
-
-