|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.ui.LookAndFeelMgr
Controls the look and feel and theme of ArgoUML. LookAndFeelMgr has a "Look and Feel" property which represents the Swing Pluggable Look-and-feel. It also has a "Theme" property which represents a MetalTheme when the Metal look-and-feel is selected.
Field Summary | |
private static MetalTheme |
BIG_THEME
|
private static String |
DEFAULT_KEY
|
private static MetalTheme |
DEFAULT_THEME
|
private String |
defaultLafClass
The class name of Swing's default look and feel (will be used if the LookAndFeel property is null). |
private static MetalTheme |
HUGE_THEME
|
private static Logger |
LOG
|
private static String |
METAL_LAF
|
private static LookAndFeelMgr |
SINGLETON
|
private static MetalTheme[] |
THEMES
|
Constructor Summary | |
private |
LookAndFeelMgr()
Creates a new instance of LookAndFeelMgr. |
Method Summary | |
String[] |
getAvailableLookAndFeelNames()
Returns the display names of the available look and feel choices. |
String[] |
getAvailableThemeNames()
Returns the display names of the available theme choices. |
String |
getCurrentLookAndFeel()
Returns the string identifier for the current look and feel. |
String |
getCurrentLookAndFeelName()
Returns the display name of the current look and feel. |
String |
getCurrentTheme()
Returns the string identifier for the current theme. |
String |
getCurrentThemeName()
Returns the display name of the current theme. |
static LookAndFeelMgr |
getInstance()
get the single instance of the LookAndFeelMgr |
String |
getLookAndFeelFromName(String name)
Returns the Look and Feel class name identifier for the specified display name, or null if no such Look and Feel is found. |
private MetalTheme |
getMetalTheme(String themeClass)
Returns the MetalTheme for the specified class name. |
Font |
getSmallFont()
|
Font |
getStandardFont()
|
String |
getThemeFromArg(String arg)
Detecting the theme from the command line. |
String |
getThemeFromName(String name)
Returns the theme class name identifier for the specified display name, or null if no such theme is found. |
void |
initializeLookAndFeel()
Sets the appearance of the UI using the current values of the LookAndFeel and Theme properties. |
boolean |
isThemeCompatibleLookAndFeel(String lafClass)
Returns true if the specified look and feel class supports setting different themes. |
void |
printThemeArgs()
Outputs command-line arguments supported by this class. |
void |
setCurrentLookAndFeel(String lafClass)
Sets the current look and feel, storing the new value in Configuration. |
void |
setCurrentTheme(String themeClass)
Sets the current theme, storing the new value in Configuration. |
private void |
setLookAndFeel(String lafClass)
Sets the look and feel in the GUI by calling UIManager.setLookAndFeel(). |
private void |
setTheme(MetalTheme theme)
Sets the metal theme in the GUI by calling MetalLookAndFeel.setCurrentTheme(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger LOG
private static final LookAndFeelMgr SINGLETON
private static final String METAL_LAF
private static final String DEFAULT_KEY
private static final MetalTheme DEFAULT_THEME
private static final MetalTheme BIG_THEME
private static final MetalTheme HUGE_THEME
private static final MetalTheme[] THEMES
private String defaultLafClass
Constructor Detail |
private LookAndFeelMgr()
Method Detail |
public static LookAndFeelMgr getInstance()
public void initializeLookAndFeel()
public String getThemeFromArg(String arg)
arg
- the argument from the command line
public void printThemeArgs()
public String[] getAvailableLookAndFeelNames()
public String[] getAvailableThemeNames()
public String getLookAndFeelFromName(String name)
name
- display name of desired look and feel
public String getThemeFromName(String name)
name
- display name of desired theme
public boolean isThemeCompatibleLookAndFeel(String lafClass)
lafClass
- look and feel class name
public String getCurrentLookAndFeel()
public String getCurrentLookAndFeelName()
public void setCurrentLookAndFeel(String lafClass)
lafClass
- class name of desired look and feelpublic String getCurrentTheme()
public String getCurrentThemeName()
public void setCurrentTheme(String themeClass)
themeClass
- class name of desired themepublic Font getStandardFont()
public Font getSmallFont()
private void setLookAndFeel(String lafClass)
lafClass
- class name of look and feelprivate void setTheme(MetalTheme theme)
theme
- new MetalTheme to setprivate MetalTheme getMetalTheme(String themeClass)
themeClass
- MetalTheme class name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |