Theme
public class PropertyTheme extends AbstractTheme
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 | Description |
---|---|
PropertyTheme(Properties properties) |
Creates a new
PropertyTheme that is initialized by the properties passed in. |
PropertyTheme(Properties properties,
boolean ignoreUnknownClasses) |
Creates a new
PropertyTheme that is initialized by the properties value and optionally prevents it from
throwing an exception if there are invalid definitions in the properties object. |
addStyle, findRedundantDeclarations, getDefaultDefinition, getDefinition, getWindowDecorationRenderer, getWindowPostRenderer, instanceByClassName
public PropertyTheme(Properties properties)
PropertyTheme
that is initialized by the properties passed in. If the properties refer to
a class that cannot be resolved, it will throw IllegalArgumentException
.properties
- Properties to initialize this theme withpublic PropertyTheme(Properties properties, boolean ignoreUnknownClasses)
PropertyTheme
that is initialized by the properties value and optionally prevents it from
throwing an exception if there are invalid definitions in the properties object.properties
- Properties to initialize this theme withignoreUnknownClasses
- If true
, will not throw an exception if there is an invalid entry in the
properties objectCopyright © 2020. All rights reserved.