public final class Themes
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addThemeListener(ThemeListener tl)
Adds a listener that will be notified when theme related events
occur.
|
static Theme |
getActiveTheme()
Returns the currently active theme.
|
static boolean |
isThemed()
Returns true if themes are switched on.
|
static void |
paintBackground(java.awt.Graphics g,
java.lang.String part,
java.lang.String state,
java.awt.Rectangle rect)
Utility to paint the background using a theme Painter.
|
static void |
removeThemeListener(ThemeListener tl)
Removes a listener that was previously added using
addThemeListener(ThemeListener). |
static void |
setActiveTheme(Theme t)
Sets the currently active theme.
|
static void |
setDefaultTheme(Theme t)
Sets the default theme.
|
public static void addThemeListener(ThemeListener tl)
tl - a listener for theme related events. Must not be null.public static void removeThemeListener(ThemeListener tl)
addThemeListener(ThemeListener).tl - a listener to remove.public static boolean isThemed()
public static Theme getActiveTheme()
public static void setActiveTheme(Theme t)
t - the new theme. May be null.public static void setDefaultTheme(Theme t)
getActiveTheme()
if no theme is active.t - a default theme.public static void paintBackground(java.awt.Graphics g,
java.lang.String part,
java.lang.String state,
java.awt.Rectangle rect)
g - part - state - rect -