ThemeStyle
public class DefaultMutableThemeStyle extends Object implements ThemeStyle
DelegatingThemeDefinition
,
DelegatingTheme
,
Theme
Constructor | Description |
---|---|
DefaultMutableThemeStyle(ThemeStyle themeStyleToCopy) |
Creates a new
DefaultMutableThemeStyle based on an existing ThemeStyle . |
DefaultMutableThemeStyle(TextColor foreground,
TextColor background,
SGR... sgrs) |
Creates a new
DefaultMutableThemeStyle with a specified style (foreground, background and SGR state) |
Modifier and Type | Method | Description |
---|---|---|
TextColor |
getBackground() |
Returns the background color associated with this style
|
TextColor |
getForeground() |
Returns the foreground color associated with this style
|
EnumSet<SGR> |
getSGRs() |
Returns the set of SGR flags associated with this style.
|
DefaultMutableThemeStyle |
setBackground(TextColor background) |
Modifies the background color of this
DefaultMutableThemeStyle to the value passed in |
DefaultMutableThemeStyle |
setForeground(TextColor foreground) |
Modifies the foreground color of this
DefaultMutableThemeStyle to the value passed in |
DefaultMutableThemeStyle |
setSGRs(EnumSet<SGR> sgrs) |
Modifies the SGR modifiers of this
DefaultMutableThemeStyle to the values passed it. |
public DefaultMutableThemeStyle(ThemeStyle themeStyleToCopy)
DefaultMutableThemeStyle
based on an existing ThemeStyle
. The values of this style
that is passed in will be copied into the new object that is created.themeStyleToCopy
- ThemeStyle
object to copy the style parameters frompublic DefaultMutableThemeStyle(TextColor foreground, TextColor background, SGR... sgrs)
DefaultMutableThemeStyle
with a specified style (foreground, background and SGR state)foreground
- Foreground color of the text with this stylebackground
- Background color of the text with this stylesgrs
- Modifiers to apply to the text with this stylepublic TextColor getForeground()
ThemeStyle
getForeground
in interface ThemeStyle
public TextColor getBackground()
ThemeStyle
getBackground
in interface ThemeStyle
public EnumSet<SGR> getSGRs()
ThemeStyle
EnumSet
is either unmodifiable or a copy so
altering it will not change the theme in any way.getSGRs
in interface ThemeStyle
public DefaultMutableThemeStyle setForeground(TextColor foreground)
DefaultMutableThemeStyle
to the value passed inforeground
- New foreground color for this theme stylepublic DefaultMutableThemeStyle setBackground(TextColor background)
DefaultMutableThemeStyle
to the value passed inbackground
- New background color for this theme stylepublic DefaultMutableThemeStyle setSGRs(EnumSet<SGR> sgrs)
DefaultMutableThemeStyle
to the values passed it.sgrs
- New SGR modifiers for this theme style, the values in this set will be copied into the internal stateCopyright © 2020. All rights reserved.