Class DelegatingTheme
java.lang.Object
com.googlecode.lanterna.graphics.DelegatingTheme
- All Implemented Interfaces:
Theme
Allows you to more easily wrap an existing theme and alter the behaviour in some special cases. You normally create a
new class that extends from this and override some of the methods to divert the call depending on what you are trying
to do. For an example, please see Issue409 in the test code.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDelegatingTheme(Theme theme) Creates a newDelegatingThemewith a default implementation that will forward all calls to theThemethat is passed in. -
Method Summary
Modifier and TypeMethodDescriptionReturns what this theme considers to be the default definitiongetDefinition(Class<?> clazz) Returns the theme definition associated with this class.Returns theWindowDecorationRendererto use for windows drawn in this theme.Returns a post-renderer to invoke after drawing each window, unless the GUI system or individual windows has their own renderers set.
-
Field Details
-
theme
-
-
Constructor Details
-
DelegatingTheme
Creates a newDelegatingThemewith a default implementation that will forward all calls to theThemethat is passed in.- Parameters:
theme- Other theme to delegate all calls to
-
-
Method Details
-
getDefaultDefinition
Description copied from interface:ThemeReturns what this theme considers to be the default definition- Specified by:
getDefaultDefinitionin interfaceTheme- Returns:
- The default theme definition
-
getDefinition
Description copied from interface:ThemeReturns the theme definition associated with this class. The implementation of Theme should ensure that this call never returnsnull, it should always give back a valid value (falling back to the default is nothing else can be used).- Specified by:
getDefinitionin interfaceTheme- Parameters:
clazz- Class to get the theme definition for- Returns:
- The ThemeDefinition for the class passed in
-
getWindowPostRenderer
Description copied from interface:ThemeReturns a post-renderer to invoke after drawing each window, unless the GUI system or individual windows has their own renderers set. Ifnull, no post-renderer will be done (unless the GUI system or the windows has a post-renderer).- Specified by:
getWindowPostRendererin interfaceTheme- Returns:
- A
WindowPostRendererto invoke after drawing each window unless overridden, ornullif none
-
getWindowDecorationRenderer
Description copied from interface:ThemeReturns theWindowDecorationRendererto use for windows drawn in this theme. Ifnullthen lanterna will fall back to useDefaultWindowDecorationRenderer.- Specified by:
getWindowDecorationRendererin interfaceTheme- Returns:
- The decoration renderer to use for this theme, or
nullto use system default
-