Package generic.theme
Class ThemeEvent
java.lang.Object
generic.theme.ThemeEvent
- Direct Known Subclasses:
AllValuesChangedThemeEvent
,ColorChangedThemeEvent
,FontChangedThemeEvent
,IconChangedThemeEvent
Event for when a theme value changes;
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if any color value changed.boolean
Returns true if any font value changed.boolean
Returns true if any icon value changed.boolean
Returns true if all colors, fonts, and icons may have changed.boolean
isColorChanged
(String id) Returns true if the color associated with the given id has changed.boolean
isFontChanged
(String id) Returns true if the font associated with the given id has changed.boolean
isIconChanged
(String id) Returns true if the icon associated with the given id has changed.boolean
Returns true if theLookAndFeel
has changed (theme changed).
-
Constructor Details
-
ThemeEvent
public ThemeEvent()
-
-
Method Details
-
isColorChanged
Returns true if the color associated with the given id has changed.- Parameters:
id
- the color id to test if changed- Returns:
- true if the color associated with the given id has changed
-
isFontChanged
Returns true if the font associated with the given id has changed.- Parameters:
id
- the font id to test if changed- Returns:
- true if the font associated with the given id has changed
-
isIconChanged
Returns true if the icon associated with the given id has changed.- Parameters:
id
- the icon id to test if changed- Returns:
- true if the icon associated with the given id has changed
-
isLookAndFeelChanged
public boolean isLookAndFeelChanged()Returns true if theLookAndFeel
has changed (theme changed).- Returns:
- true if the
LookAndFeel
has changed (theme changed).
-
hasAnyColorChanged
public boolean hasAnyColorChanged()Returns true if any color value changed.- Returns:
- true if any color value changed.
-
hasAnyFontChanged
public boolean hasAnyFontChanged()Returns true if any font value changed.- Returns:
- true if any font value changed.
-
hasAnyIconChanged
public boolean hasAnyIconChanged()Returns true if any icon value changed.- Returns:
- true if any icon value changed.
-
haveAllValuesChanged
public boolean haveAllValuesChanged()Returns true if all colors, fonts, and icons may have changed. This doesn't guarantee that all the values have actually changed, just that they might have. In other words, a mass change occurred (theme change, theme reset, etc.) and any or all values may have changed.- Returns:
- true if all colors, fonts, and icons may have changed.
-