Enum Class UISchemes.Mode
- All Implemented Interfaces:
Serializable, Comparable<UISchemes.Mode>, Constable
- Enclosing class:
UISchemes
The modes: light, dark, or auto that follows the OS (ruled Q6, R6).
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsField Summary
FieldsMethod Summary
Modifier and TypeMethodDescriptionstatic UISchemes.ModeGets a mode from its name,AUTO_LIGHT_ALIASgivingAUTO.Gets the mode a page shows when the system cannot tell: the fallback of an auto mode, the mode itself otherwise.booleanisAuto()Checks if this mode follows the OS.static UISchemes.ModeReturns the enum constant of this class with the specified name.static UISchemes.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
LIGHT
The light member of the family.DARK
The dark member of the family.AUTO
Follow the OS: light or dark as the device says, listening for changes; light when the system cannot tell. The nameauto_lightis an alias of this mode.AUTO_DARK
Follow the OS, dark when the system cannot tell.
Field Details
AUTO_LIGHT_ALIAS
name
The name, as the CSS attributedata-iz-modecarries it (light or dark; auto is resolved by the client).description
The description shown in the Designer.
Method Details
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
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 nameNullPointerException- if the argument is null
get
Gets a mode from its name,AUTO_LIGHT_ALIASgivingAUTO.- Parameters:
name- The name.- Returns:
- The mode, or null if not found.
isAuto
getFallback
Gets the mode a page shows when the system cannot tell: the fallback of an auto mode, the mode itself otherwise.