|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.cgjennings.ui.Theme
public abstract class Theme
A Theme encapsulates a UI design theme.
Themes are applied before installing a look and feel and are expected to
modify the design parameters of a look and feel (typically by changing
values in UIDefaults).
| Nested Class Summary | |
|---|---|
static class |
Theme.BufferedConsolePainter
This painter wraps another painter, buffering the wrapped painter so that it only needs to be called when the console window's size changes. |
static interface |
Theme.ConsolePainter
Interface for objects that can paint the background of the scripting console. |
| Field Summary | |
|---|---|
static boolean |
INVERT_PANEL_ICONS_HINT
A hint that the theme uses dark colours so that dark icons on the panel should be inverted or substituted. |
| Constructor Summary | |
|---|---|
Theme()
|
|
| Method Summary | |
|---|---|
abstract void |
applyTheme(javax.swing.UIDefaults defaults)
This method is called after the look and feel has been installed and allows you to set defaults in the look and feel's UI defaults. |
static java.lang.String |
findAvailableFontFamily(java.lang.String families)
Returns the first font family in a list of comma-separated font families that is available on this system. |
static java.lang.String |
findAvailableFontFamily(java.lang.String[] families)
Given an array of font family names, returns the first font family that is available on this system. |
void |
finish(javax.swing.LookAndFeel laf)
Called after the look and feel instance has been installed. |
java.lang.String |
getClassName()
Returns the look and feel class name. |
abstract java.lang.String |
getThemeName()
Returns the name of this theme, as it should be presented to the user. |
abstract void |
initializeUIDefaults(javax.swing.UIDefaults defaults)
This method is called prior to installing the look and feel and allows you to set defaults in the user UI defaults. |
void |
setConsoleStyle(java.awt.Color background,
java.awt.Color text,
java.awt.Color errorText,
java.awt.Color selection,
java.awt.Color selectionText)
Changes the style for the script console. |
void |
setConsoleStyle(java.awt.Color background,
java.awt.Color text,
java.awt.Color errorText,
java.awt.Color selection,
java.awt.Color selectionText,
Theme.ConsolePainter backdrop)
Changes the style for the script console. |
void |
start(javax.swing.LookAndFeel laf)
Called after instantiating the look and feel but before installing it. |
java.lang.String |
toString()
Returns the name of the theme, as given by getThemeName(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean INVERT_PANEL_ICONS_HINT
| Constructor Detail |
|---|
public Theme()
| Method Detail |
|---|
public abstract java.lang.String getThemeName()
public abstract void initializeUIDefaults(javax.swing.UIDefaults defaults)
defaults - the user UI defaults objectpublic abstract void applyTheme(javax.swing.UIDefaults defaults)
defaults - the Look and Feel UI defaults
public final void setConsoleStyle(java.awt.Color background,
java.awt.Color text,
java.awt.Color errorText,
java.awt.Color selection,
java.awt.Color selectionText)
background - the background colour for the consoletext - the primary text colourerrorText - the text colour for error messagesselection - the background colour for selected textselectionText - the foreground colour for selected text
public final void setConsoleStyle(java.awt.Color background,
java.awt.Color text,
java.awt.Color errorText,
java.awt.Color selection,
java.awt.Color selectionText,
Theme.ConsolePainter backdrop)
Theme.ConsolePainter.
background - the background colour for the consoletext - the primary text colourerrorText - the text colour for error messagesselection - the background colour for selected textselectionText - the foreground colour for selected textpublic java.lang.String toString()
getThemeName().
toString in class java.lang.Objectpublic static java.lang.String findAvailableFontFamily(java.lang.String families)
families - a list of comma-separated font family names
public static java.lang.String findAvailableFontFamily(java.lang.String[] families)
Font.SANS_SERIF.
families - an array of candidate family names
families,
or the standard sans-serif family namepublic java.lang.String getClassName()
LookAndFeel subclasspublic void start(javax.swing.LookAndFeel laf)
laf - the look and feel instance being installedpublic void finish(javax.swing.LookAndFeel laf)
laf - the look and feel instance that was installed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||