Class PropertyTheme
java.lang.Object
com.googlecode.lanterna.graphics.AbstractTheme
com.googlecode.lanterna.graphics.PropertyTheme
- All Implemented Interfaces:
Theme
- Direct Known Subclasses:
DefaultTheme
Theme implementation that stores the theme definition in a regular java Properties object. The format is:
foreground = black
background = white
sgr =
com.mypackage.mycomponent.MyClass.foreground = yellow
com.mypackage.mycomponent.MyClass.background = white
com.mypackage.mycomponent.MyClass.sgr =
com.mypackage.mycomponent.MyClass.foreground[ACTIVE] = red
com.mypackage.mycomponent.MyClass.background[ACTIVE] = black
com.mypackage.mycomponent.MyClass.sgr[ACTIVE] = bold
...
See the documentation on Theme for further information about different style categories that can be assigned.
The foreground, background and sgr entries without a class specifier will be tied to the global fallback and is used
if the libraries tries to apply a theme style that isn't specified in the Properties object and there is no other
superclass specified either.-
Constructor Summary
ConstructorsConstructorDescriptionPropertyTheme(Properties properties) Creates a newPropertyThemethat is initialized by the properties passed in.PropertyTheme(Properties properties, boolean ignoreUnknownClasses) Creates a newPropertyThemethat is initialized by the properties value and optionally prevents it from throwing an exception if there are invalid definitions in the properties object. -
Method Summary
Methods inherited from class AbstractTheme
addStyle, findRedundantDeclarations, getDefaultDefinition, getDefinition, getWindowDecorationRenderer, getWindowPostRenderer, instanceByClassName
-
Constructor Details
-
PropertyTheme
Creates a newPropertyThemethat is initialized by the properties passed in. If the properties refer to a class that cannot be resolved, it will throwIllegalArgumentException.- Parameters:
properties- Properties to initialize this theme with
-
PropertyTheme
Creates a newPropertyThemethat is initialized by the properties value and optionally prevents it from throwing an exception if there are invalid definitions in the properties object.- Parameters:
properties- Properties to initialize this theme withignoreUnknownClasses- Iftrue, will not throw an exception if there is an invalid entry in the properties object
-
-
Method Details
-
getDefinition
-
getStyle
-