Enum Class Theme
- All Implemented Interfaces:
Serializable,Comparable<Theme>,Constable
The built-in colour themes. Tokens are defined in the CSS files, see docs/design/branding.md.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaccentStyle(Theme theme) The declarations that put the accent into a window of this theme; empty when there is no accent.static voidApplies the base style sheet and the one of the theme to the scene, and the accent colour to its root.javafx.scene.paint.ColorA colour token of this theme (thenameof-st-name) as a colour, for drawing that cannot use CSS (the commit graph is painted on a canvas).static ThemeThe theme with this key, or the fallback.key()Value stored in the settings file.static voidThe accent colour of the user as#rrggbb, or empty for the colour of the theme.toggled()The other theme.static ThemeReturns the enum constant of this class with the specified name.static Theme[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LIGHT
-
DARK
-
-
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
-
key
Value stored in the settings file. -
fromKey
The theme with this key, or the fallback. -
color
A colour token of this theme (thenameof-st-name) as a colour, for drawing that cannot use CSS (the commit graph is painted on a canvas). Read from the theme's own stylesheet, so there is one source of truth. Falls back to grey for a token that is not a plain colour. -
toggled
The other theme. -
setAccent
The accent colour of the user as#rrggbb, or empty for the colour of the theme. Applied byapply(javafx.scene.Scene, io.github.jbastgen.stemma.app.theme.Theme). -
accentStyle
The declarations that put the accent into a window of this theme; empty when there is no accent. -
apply
Applies the base style sheet and the one of the theme to the scene, and the accent colour to its root.
-