|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.ui.ThemeManager
public class ThemeManager
This class holds GUI customization information. Customization consists of various colors used in AoI GUI as well as the look and feel of some GUI elements (eg buttons). In this respect, the theme manager is thus a factory of GUI elements.
Nested Class Summary | |
---|---|
static class |
ThemeManager.ButtonStyle
nested ButtonStyle class. |
static class |
ThemeManager.ColorSet
This class hold all the colors used by a theme. |
static class |
ThemeManager.ThemeInfo
This class stores information about a theme. |
Constructor Summary | |
---|---|
ThemeManager()
|
Method Summary | |
---|---|
static java.awt.Color |
getAppBackgroundColor()
Returns the background color of the application (not to be mistaken for the view background) |
static int |
getButtonMargin()
Returns the button margin to use for tool palette display |
static ThemeManager.ButtonStyle |
getButtonStyle(java.lang.Object owner)
returns the ButtonStyle for the current Theme and the specified owner. |
static ThemeManager.ThemeInfo |
getDefaultTheme()
Get the default theme. |
static java.awt.Color |
getDockableBarColor1()
Returns the first color of the dockable widgets title bar gradient painting |
static java.awt.Color |
getDockableBarColor2()
Returns the second color of the dockable widgets title bar gradient painting |
static java.awt.Color |
getDockableTitleColor()
Returns the text color of the dockable widgets title bar text |
static javax.swing.ImageIcon |
getIcon(java.lang.String iconName)
Given an icon file name, this method returns the icon according to the currently selected theme. |
static javax.swing.ImageIcon |
getNotFoundIcon(java.lang.Object owner)
return the notFound icon most appropriate to the slected Theme and the specified owner. |
static java.net.URL |
getNotFoundURL(java.lang.Object owner)
return the URL for the "notFound" icon for the selected Theme and the style associated with the specified owner. |
static java.awt.Color |
getPaletteBackgroundColor()
Returns the tool palette background color |
static int |
getPaletteMargin()
Returns the palette margin to use for tool palette display |
static ThemeManager.ColorSet |
getSelectedColorSet()
Get the currently selected color set. |
static ThemeManager.ThemeInfo |
getSelectedTheme()
Get the currently selected theme. |
static java.awt.Color |
getTextColor()
Returns the color of the text to use for widgets. |
static java.util.List |
getThemes()
Get a list of all available themes. |
static ToolButton |
getToolButton(java.lang.Object owner,
java.lang.String iconName)
Creates a ToolButton according to the current theme |
static ToolButton |
getToolButton(java.lang.Object owner,
java.lang.String iconName,
java.lang.String selectedIconName)
Deprecated. this method allows pre 2.7 plugins to continue to function. Such code should be ported to the new API as soon as possible. |
static void |
initThemes()
This is invoked during startup to initialize the list of installed themes. |
static void |
setSelectedColorSet(ThemeManager.ColorSet colorSet)
Set the currently selected color set. |
static void |
setSelectedTheme(ThemeManager.ThemeInfo theme)
Set the currently selected theme. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThemeManager()
Method Detail |
---|
public static ThemeManager.ThemeInfo getSelectedTheme()
public static void setSelectedTheme(ThemeManager.ThemeInfo theme)
public static ThemeManager.ColorSet getSelectedColorSet()
public static void setSelectedColorSet(ThemeManager.ColorSet colorSet)
public static java.util.List getThemes()
public static ThemeManager.ThemeInfo getDefaultTheme()
public static java.net.URL getNotFoundURL(java.lang.Object owner)
owner
- the owner of the button icon that could not be found.
public static javax.swing.ImageIcon getNotFoundIcon(java.lang.Object owner)
owner
- the owner of the button icon which could not be found.
public static ToolButton getToolButton(java.lang.Object owner, java.lang.String iconName, java.lang.String selectedIconName)
public static ToolButton getToolButton(java.lang.Object owner, java.lang.String iconName)
owner
- The button ownericonName
- The name of the icon to display on the button, without extension
public static javax.swing.ImageIcon getIcon(java.lang.String iconName)
iconName
- The file name of the icon, without extension.
public static java.awt.Color getAppBackgroundColor()
public static java.awt.Color getPaletteBackgroundColor()
public static java.awt.Color getDockableBarColor1()
public static java.awt.Color getDockableBarColor2()
public static java.awt.Color getDockableTitleColor()
public static java.awt.Color getTextColor()
public static void initThemes()
public static int getPaletteMargin()
public static int getButtonMargin()
public static ThemeManager.ButtonStyle getButtonStyle(java.lang.Object owner)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |