|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.muntjak.tinylookandfeel.Theme
public class Theme
Theme is a data container for all the properties of a TinyLaF theme.
Notes on Theme Switching:
This class has several static methods to load themes.
After loading a theme, TinyLookAndFeel needs to be
re-installed and the uis need to be recreated like this:
// re-install the Tiny Look and Feel
UIManager.setLookAndFeel(new TinyLookAndFeel());
// Update the ComponentUIs for all Components. This
// needs to be invoked for all windows.
SwingUtilities.updateComponentTreeUI(rootComponent);
To enable your users to switch themes, follow these steps:
getAvailableThemes()
to get an array of ThemeDescription objects. By
iterating through the array and calling
ThemeDescription.getName(), you can
build a menu presenting the available themes.
loadTheme(ThemeDescription) passing in the selected
ThemeDescription objectt.
TinyLookAndFeel and
recreate the uis).
| Method Summary | |
|---|---|
static ThemeDescription[] |
getAvailableThemes()
Searches for available TinyLaF theme resources and returns them as an array of ThemeDescriptions. |
static java.lang.String |
getPlatformFont(java.lang.String fontFamily)
|
static boolean |
loadTheme(java.io.File f)
Loads a theme from the specified file. |
static boolean |
loadTheme(ThemeDescription td)
Loads the specified theme. |
static boolean |
loadTheme(java.net.URL url)
Loads a theme from the specified URL. |
static void |
loadYQTheme()
Loads the default (hard-coded) YQ theme. |
static boolean |
saveTheme(java.lang.String fileName)
Saves the current theme. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.io.FilenameFilter THEMES_FILTER
public static final int ERROR_NONE
public static final int ERROR_NULL_ARGUMENT
public static final int ERROR_FILE_NOT_FOUND
public static final int ERROR_IO_EXCEPTION
public static final int ERROR_NO_TINYLAF_THEME
public static final int ERROR_WIN99_STYLE
public static final int ERROR_INVALID_THEME_DESCRIPTION
public static int errorCode
ERROR_FILE_NOT_FOUND - the specified file
doesn't exist.
ERROR_IO_EXCEPTION - a java.io.IOException
occured while trying to load a theme.
ERROR_INVALID_THEME_DESCRIPTION - loadTheme()
was called passing in an invalid ThemeDescription argument.
ERROR_NO_TINYLAF_THEME - the specified resource
is no TinyLaF theme.
ERROR_NULL_ARGUMENT - the argument to loadTheme
was null.
ERROR_WIN99_STYLE - since version 1.4.0, the 99 style
is supported no more.
protected static final java.util.Properties MAC_FONT_MAPPINGS
protected static final java.util.Properties LINUX_FONT_MAPPINGS
protected static final int YQ_STYLE
public static final java.lang.String DEFAULT_THEME
public static final java.lang.String FILE_EXTENSION
protected static final int FILE_ID_1
protected static final int FILE_ID_2
public static final int FILE_ID_3A
protected static final int FILE_ID_3B
protected static final int FILE_ID_3C
protected static final int FILE_ID_3D
protected static final int FILE_ID_3E
protected static final int FILE_ID_3F
protected static final int FILE_ID_4
protected static final int FILE_ID_4B
protected static final int FILE_ID_4C
protected static final int FILE_ID_4D
protected static final int FILE_ID_4E
public static int fileID
public static SBReference mainColor
public static SBReference disColor
public static SBReference backColor
public static SBReference frameColor
public static SBReference sub1Color
public static SBReference sub2Color
public static SBReference sub3Color
public static SBReference sub4Color
public static SBReference sub5Color
public static SBReference sub6Color
public static SBReference sub7Color
public static SBReference sub8Color
public static ColoredFont plainFont
public static ColoredFont boldFont
public static ColoredFont buttonFont
public static SBReference buttonFontColor
public static ColoredFont labelFont
public static SBReference labelFontColor
public static ColoredFont comboFont
public static ColoredFont listFont
public static ColoredFont menuFont
public static SBReference menuFontColor
public static ColoredFont menuItemFont
public static SBReference menuItemFontColor
public static ColoredFont passwordFont
public static ColoredFont radioFont
public static SBReference radioFontColor
public static ColoredFont checkFont
public static SBReference checkFontColor
public static ColoredFont tableFont
public static SBReference tableFontColor
public static ColoredFont tableHeaderFont
public static SBReference tableHeaderFontColor
public static ColoredFont textAreaFont
public static ColoredFont textFieldFont
public static ColoredFont textPaneFont
public static ColoredFont titledBorderFont
public static SBReference titledBorderFontColor
public static ColoredFont toolTipFont
public static ColoredFont treeFont
public static ColoredFont tabFont
public static SBReference tabFontColor
public static ColoredFont editorFont
public static ColoredFont frameTitleFont
public static ColoredFont internalFrameTitleFont
public static ColoredFont internalPaletteTitleFont
public static ColoredFont progressBarFont
public static SBReference progressColor
public static SBReference progressTrackColor
public static SBReference progressBorderColor
public static SBReference progressDarkColor
public static SBReference progressLightColor
public static SBReference progressSelectForeColor
public static SBReference progressSelectBackColor
public static SBReference textBgColor
public static SBReference textSelectedBgColor
public static SBReference textDisabledBgColor
public static SBReference textNonEditableBgColor
public static SBReference textTextColor
public static SBReference textSelectedTextColor
public static SBReference textBorderColor
public static SBReference textBorderDisabledColor
public static SBReference textCaretColor
public static SBReference textPaneBgColor
public static SBReference editorPaneBgColor
public static SBReference desktopPaneBgColor
public static javax.swing.plaf.InsetsUIResource textInsets
public static SBReference comboBorderColor
public static SBReference comboBorderDisabledColor
public static SBReference comboSelectedBgColor
public static SBReference comboSelectedTextColor
public static SBReference comboFocusBgColor
public static SBReference comboArrowColor
public static SBReference comboArrowDisabledColor
public static SBReference comboButtColor
public static SBReference comboButtRolloverColor
public static SBReference comboButtPressedColor
public static SBReference comboButtDisabledColor
public static SBReference comboButtBorderColor
public static SBReference comboButtBorderDisabledColor
public static SBReference comboBgColor
public static SBReference comboTextColor
public static IntReference comboSpreadLight
public static IntReference comboSpreadLightDisabled
public static IntReference comboSpreadDark
public static IntReference comboSpreadDarkDisabled
public static javax.swing.plaf.InsetsUIResource comboInsets
public static BooleanReference comboRollover
public static BooleanReference comboFocus
public static SBReference listBgColor
public static SBReference listTextColor
public static SBReference listSelectedBgColor
public static SBReference listSelectedTextColor
public static SBReference listFocusBorderColor
public static SBReference menuBarColor
public static SBReference menuRolloverBgColor
public static SBReference menuRolloverFgColor
public static SBReference menuDisabledFgColor
public static SBReference menuItemDisabledFgColor
public static SBReference menuItemRolloverColor
public static SBReference menuItemSelectedTextColor
public static SBReference menuBorderColor
public static SBReference menuPopupColor
public static SBReference menuInnerHilightColor
public static SBReference menuInnerShadowColor
public static SBReference menuOuterHilightColor
public static SBReference menuOuterShadowColor
public static SBReference menuIconColor
public static SBReference menuIconRolloverColor
public static SBReference menuIconDisabledColor
public static SBReference menuSeparatorColor
public static BooleanReference menuRollover
public static BooleanReference menuPopupShadow
public static BooleanReference menuAllowTwoIcons
public static SBReference toolBarColor
public static SBReference toolBarDarkColor
public static SBReference toolBarLightColor
public static SBReference toolButtColor
public static SBReference toolButtSelectedColor
public static SBReference toolButtRolloverColor
public static SBReference toolButtPressedColor
public static SBReference toolBorderColor
public static SBReference toolBorderSelectedColor
public static SBReference toolBorderRolloverColor
public static SBReference toolBorderPressedColor
public static SBReference toolGripDarkColor
public static SBReference toolGripLightColor
public static SBReference toolSeparatorColor
public static javax.swing.plaf.InsetsUIResource toolMargin
public static BooleanReference toolFocus
public static BooleanReference toolRollover
public static SBReference buttonNormalColor
public static SBReference buttonRolloverBgColor
public static SBReference buttonPressedColor
public static SBReference buttonDisabledColor
public static SBReference buttonRolloverColor
public static SBReference buttonDefaultColor
public static SBReference buttonCheckColor
public static SBReference buttonCheckDisabledColor
public static SBReference buttonBorderColor
public static SBReference buttonBorderDisabledColor
public static SBReference buttonDisabledFgColor
public static SBReference checkDisabledFgColor
public static SBReference radioDisabledFgColor
public static SBReference toggleSelectedBg
public static BooleanReference buttonRolloverBorder
public static BooleanReference buttonFocus
public static BooleanReference buttonFocusBorder
public static BooleanReference buttonEnter
public static BooleanReference shiftButtonText
public static javax.swing.plaf.InsetsUIResource buttonMargin
public static IntReference buttonSpreadLight
public static IntReference buttonSpreadLightDisabled
public static IntReference buttonSpreadDark
public static IntReference buttonSpreadDarkDisabled
public static javax.swing.plaf.InsetsUIResource checkMargin
public static SBReference tabPaneBorderColor
public static SBReference tabNormalColor
public static SBReference tabSelectedColor
public static SBReference tabDisabledColor
public static SBReference tabDisabledSelectedColor
public static SBReference tabDisabledTextColor
public static SBReference tabBorderColor
public static SBReference tabRolloverColor
public static SBReference tabPaneDisabledBorderColor
public static SBReference tabDisabledBorderColor
public static BooleanReference tabRollover
public static BooleanReference tabFocus
public static BooleanReference ignoreSelectedBg
public static BooleanReference fixedTabs
public static javax.swing.plaf.InsetsUIResource tabInsets
public static javax.swing.plaf.InsetsUIResource tabAreaInsets
public static BooleanReference sliderRolloverEnabled
public static BooleanReference sliderFocusEnabled
public static SBReference sliderThumbColor
public static SBReference sliderThumbRolloverColor
public static SBReference sliderThumbPressedColor
public static SBReference sliderThumbDisabledColor
public static SBReference sliderBorderColor
public static SBReference sliderDarkColor
public static SBReference sliderLightColor
public static SBReference sliderBorderDisabledColor
public static SBReference sliderTrackColor
public static SBReference sliderTrackBorderColor
public static SBReference sliderTrackDarkColor
public static SBReference sliderTrackLightColor
public static SBReference sliderTickColor
public static SBReference sliderTickDisabledColor
public static SBReference sliderFocusColor
public static BooleanReference spinnerRollover
public static SBReference spinnerButtColor
public static SBReference spinnerButtRolloverColor
public static SBReference spinnerButtPressedColor
public static SBReference spinnerButtDisabledColor
public static SBReference spinnerBorderColor
public static SBReference spinnerBorderDisabledColor
public static SBReference spinnerArrowColor
public static SBReference spinnerArrowDisabledColor
public static IntReference spinnerSpreadLight
public static IntReference spinnerSpreadLightDisabled
public static IntReference spinnerSpreadDark
public static IntReference spinnerSpreadDarkDisabled
public static SBReference scrollTrackColor
public static SBReference scrollTrackDisabledColor
public static SBReference scrollTrackBorderColor
public static SBReference scrollTrackBorderDisabledColor
public static SBReference scrollThumbColor
public static SBReference scrollThumbRolloverColor
public static SBReference scrollThumbPressedColor
public static SBReference scrollThumbDisabledColor
public static SBReference scrollButtColor
public static SBReference scrollButtRolloverColor
public static SBReference scrollButtPressedColor
public static SBReference scrollButtDisabledColor
public static SBReference scrollArrowColor
public static SBReference scrollArrowDisabledColor
public static SBReference scrollGripLightColor
public static SBReference scrollGripDarkColor
public static SBReference scrollBorderColor
public static SBReference scrollBorderLightColor
public static SBReference scrollBorderDisabledColor
public static SBReference scrollLightDisabledColor
public static SBReference scrollPaneBorderColor
public static IntReference scrollSpreadLight
public static IntReference scrollSpreadLightDisabled
public static IntReference scrollSpreadDark
public static IntReference scrollSpreadDarkDisabled
public static BooleanReference scrollRollover
public static IntReference scrollSize
public static SBReference treeBgColor
public static SBReference treeTextColor
public static SBReference treeTextBgColor
public static SBReference treeSelectedTextColor
public static SBReference treeSelectedBgColor
public static SBReference treeLineColor
public static SBReference frameCaptionColor
public static SBReference frameCaptionDisabledColor
public static SBReference frameBorderColor
public static SBReference frameLightColor
public static SBReference frameBorderDisabledColor
public static SBReference frameLightDisabledColor
public static SBReference frameTitleColor
public static SBReference frameTitleShadowColor
public static SBReference frameTitleDisabledColor
public static SBReference frameButtColor
public static SBReference frameButtRolloverColor
public static SBReference frameButtPressedColor
public static SBReference frameButtDisabledColor
public static SBReference frameButtCloseColor
public static SBReference frameButtCloseRolloverColor
public static SBReference frameButtClosePressedColor
public static SBReference frameButtCloseDisabledColor
public static SBReference frameButtBorderColor
public static SBReference frameButtBorderDisabledColor
public static IntReference frameButtSpreadLight
public static IntReference frameButtSpreadDark
public static IntReference frameButtSpreadLightDisabled
public static IntReference frameButtSpreadDarkDisabled
public static SBReference frameButtCloseBorderColor
public static SBReference frameButtCloseDarkColor
public static SBReference frameButtCloseLightColor
public static SBReference frameButtCloseBorderDisabledColor
public static IntReference frameButtCloseSpreadLight
public static IntReference frameButtCloseSpreadLightDisabled
public static IntReference frameButtCloseSpreadDark
public static IntReference frameButtCloseSpreadDarkDisabled
public static SBReference frameSymbolColor
public static SBReference frameSymbolPressedColor
public static SBReference frameSymbolDisabledColor
public static SBReference frameSymbolDarkColor
public static SBReference frameSymbolLightColor
public static SBReference frameSymbolDarkDisabledColor
public static SBReference frameSymbolLightDisabledColor
public static SBReference frameSymbolCloseColor
public static SBReference frameSymbolClosePressedColor
public static SBReference frameSymbolCloseDisabledColor
public static SBReference frameSymbolCloseDarkColor
public static SBReference frameSymbolCloseDarkDisabledColor
public static IntReference frameSpreadDark
public static IntReference frameSpreadLight
public static IntReference frameSpreadDarkDisabled
public static IntReference frameSpreadLightDisabled
public static SBReference tableBackColor
public static SBReference tableHeaderBackColor
public static SBReference tableHeaderRolloverBackColor
public static SBReference tableHeaderRolloverColor
public static SBReference tableHeaderArrowColor
public static SBReference tableGridColor
public static SBReference tableSelectedBackColor
public static SBReference tableSelectedForeColor
public static SBReference tableBorderDarkColor
public static SBReference tableBorderLightColor
public static SBReference tableHeaderDarkColor
public static SBReference tableHeaderLightColor
public static SBReference tableFocusBorderColor
public static SBReference tableAlternateRowColor
public static HSBReference[] colorizer
public static BooleanReference[] colorize
public static SBReference separatorColor
public static SBReference tipBorderColor
public static SBReference tipBorderDis
public static SBReference tipBgColor
public static SBReference tipBgDis
public static SBReference tipTextColor
public static SBReference tipTextDis
public static SBReference titledBorderColor
public static SBReference splitPaneButtonColor
| Method Detail |
|---|
public static ThemeDescription[] getAvailableThemes()
ThemeDescriptions.
The search order is as follows:
ThemeDescription objects which can be of
zero length but will not be null.public static java.lang.String getPlatformFont(java.lang.String fontFamily)
public static void loadYQTheme()
public static boolean loadTheme(java.io.File f)
f - a non-null file specifying a TinyLaF theme
true if the theme was successfully loaded,
false otherwise. If false is returned
then errorCode is set to a value other than ERROR_NONE.public static boolean loadTheme(ThemeDescription td)
td - a non-null ThemeDescription
true if the theme was successfully loaded,
false otherwise. If false is returned
then errorCode is set to a value other than ERROR_NONE.public static boolean loadTheme(java.net.URL url)
url - a non-null URL specifying a TinyLaF theme
true if the theme was successfully loaded,
false otherwise. If false is returned
then errorCode is set to a value other than ERROR_NONE.public static boolean saveTheme(java.lang.String fileName)
fileName - a non-null file path
true if the theme was successfully saved,
false otherwise.
java.lang.IllegalArgumentException - if fileName is
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||