Java Doc for MetalLookAndFeel.java in  » 6.0-JDK-Core » swing » javax » swing » plaf » metal » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » swing » javax.swing.plaf.metal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.LookAndFeel
      javax.swing.plaf.basic.BasicLookAndFeel
         javax.swing.plaf.metal.MetalLookAndFeel

MetalLookAndFeel
public class MetalLookAndFeel extends BasicLookAndFeel (Code)
The Java Look and Feel, otherwise known as Metal.

Each of the ComponentUI s provided by MetalLookAndFeel derives its behavior from the defaults table. Unless otherwise noted each of the ComponentUI implementations in this package document the set of defaults they use. Unless otherwise noted the defaults are installed at the time installUI is invoked, and follow the recommendations outlined in LookAndFeel for installing defaults.

MetalLookAndFeel derives it's color palette and fonts from MetalTheme . The default theme is OceanTheme . The theme can be changed using the setCurrentTheme method, refer to it for details on changing the theme. Prior to 1.5 the default theme was DefaultMetalTheme . The system property "swing.metalTheme" can be set to "steel" to indicate the default should be DefaultMetalTheme .

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder .
See Also:   MetalTheme
See Also:   DefaultMetalTheme
See Also:   OceanTheme
version:
   @(#)MetalLookAndFeel.java 1.213 07/06/07
author:
   Steve Wilson


Inner Class :static class AATextListener extends WeakReference implements PropertyChangeListener

Field Summary
static  ReferenceQueuequeue
    


Method Summary
protected  voidcreateDefaultTheme()
     Ensures the current MetalTheme is non-null .
static  voidflushUnreferenced()
    
public static  ColorUIResourcegetAcceleratorForeground()
     Returns the accelerator foreground color of the current theme.
public static  ColorUIResourcegetAcceleratorSelectedForeground()
     Returns the accelerator selected foreground color of the current theme.
public static  ColorUIResourcegetBlack()
     Returns the black color of the current theme.
public static  ColorUIResourcegetControl()
     Returns the control color of the current theme.
public static  ColorUIResourcegetControlDarkShadow()
     Returns the control dark shadow color of the current theme.
public static  ColorUIResourcegetControlDisabled()
     Returns the control disabled color of the current theme.
public static  ColorUIResourcegetControlHighlight()
     Returns the control highlight color of the current theme.
public static  ColorUIResourcegetControlInfo()
     Returns the control info color of the current theme.
public static  ColorUIResourcegetControlShadow()
     Returns the control shadow color of the current theme.
public static  ColorUIResourcegetControlTextColor()
     Returns the control text color of the current theme.
public static  FontUIResourcegetControlTextFont()
     Returns the control text font of the current theme.
public static  MetalThemegetCurrentTheme()
     Return the theme currently being used by MetalLookAndFeel.
public  UIDefaultsgetDefaults()
     Returns the look and feel defaults.
public  StringgetDescription()
     Returns a short description of this look and feel.
public static  ColorUIResourcegetDesktopColor()
     Returns the desktop color of the current theme.
public  IcongetDisabledIcon(JComponent component, Icon icon)
     Returns an Icon with a disabled appearance. This method is used to generate a disabled Icon when one has not been specified.
public  IcongetDisabledSelectedIcon(JComponent component, Icon icon)
     Returns an Icon for use by disabled components that are also selected.
public static  ColorUIResourcegetFocusColor()
     Returns the focus color of the current theme.
public static  ColorUIResourcegetHighlightedTextColor()
     Returns the highlighted text color of the current theme.
public  StringgetID()
     Returns an identifier for this look and feel.
public static  ColorUIResourcegetInactiveControlTextColor()
     Returns the inactive control text color of the current theme.
public static  ColorUIResourcegetInactiveSystemTextColor()
     Returns the inactive system text color of the current theme.
public  LayoutStylegetLayoutStyle()
     Returns a LayoutStyle implementing the Java look and feel design guidelines as specified at http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html.
public static  ColorUIResourcegetMenuBackground()
     Returns the menu background color of the current theme.
public static  ColorUIResourcegetMenuDisabledForeground()
     Returns the menu disabled foreground color of the current theme.
public static  ColorUIResourcegetMenuForeground()
     Returns the menu foreground color of the current theme.
public static  ColorUIResourcegetMenuSelectedBackground()
     Returns the menu selected background color of the current theme.
public static  ColorUIResourcegetMenuSelectedForeground()
     Returns the menu selected foreground color of the current theme.
public static  FontUIResourcegetMenuTextFont()
     Returns the menu text font of the current theme.
public  StringgetName()
     Returns the name of this look and feel.
public static  ColorUIResourcegetPrimaryControl()
     Returns the primary control color of the current theme.
public static  ColorUIResourcegetPrimaryControlDarkShadow()
     Returns the primary control dark shadow color of the current theme.
public static  ColorUIResourcegetPrimaryControlHighlight()
     Returns the primary control highlight color of the current theme.
public static  ColorUIResourcegetPrimaryControlInfo()
     Returns the primary control info color of the current theme.
public static  ColorUIResourcegetPrimaryControlShadow()
     Returns the primary control shadow color of the current theme.
public static  ColorUIResourcegetSeparatorBackground()
     Returns the separator background color of the current theme.
public static  ColorUIResourcegetSeparatorForeground()
     Returns the separator foreground color of the current theme.
public static  FontUIResourcegetSubTextFont()
     Returns the sub-text font of the current theme.
public  booleangetSupportsWindowDecorations()
     Returns true ; metal can provide Window decorations.
public static  ColorUIResourcegetSystemTextColor()
     Returns the system text color of the current theme.
public static  FontUIResourcegetSystemTextFont()
     Returns the sytem text font of the current theme.
public static  ColorUIResourcegetTextHighlightColor()
     Returns the text highlight color of the current theme.
public static  ColorUIResourcegetUserTextColor()
     Returns the user text color of the current theme.
public static  FontUIResourcegetUserTextFont()
     Returns the user text font of the current theme.
public static  ColorUIResourcegetWhite()
     Returns the white color of the current theme.
public static  ColorUIResourcegetWindowBackground()
     Returns the window background color of the current theme.
public static  ColorUIResourcegetWindowTitleBackground()
     Returns the window title background color of the current theme.
public static  FontUIResourcegetWindowTitleFont()
     Returns the window title font of the current theme.
public static  ColorUIResourcegetWindowTitleForeground()
     Returns the window title foreground color of the current theme.
public static  ColorUIResourcegetWindowTitleInactiveBackground()
     Returns the window title inactive background color of the current theme.
public static  ColorUIResourcegetWindowTitleInactiveForeground()
     Returns the window title inactive foreground color of the current theme.
protected  voidinitClassDefaults(UIDefaults table)
     Populates table with mappings from uiClassID to the fully qualified name of the ui class.
protected  voidinitComponentDefaults(UIDefaults table)
     Populates table with the defaults for metal.
protected  voidinitSystemColorDefaults(UIDefaults table)
     Populates table with system colors.
public  booleanisNativeLookAndFeel()
     Returns false ; MetalLookAndFeel is not a native look and feel.
public  booleanisSupportedLookAndFeel()
     Returns true ; MetalLookAndFeel can be run on any platform.
static  booleanisWindows()
     Returns true if running on Windows.
public  voidprovideErrorFeedback(Component component)
    
public static  voidsetCurrentTheme(MetalTheme theme)
     Set the theme used by MetalLookAndFeel.

After the theme is set, MetalLookAndFeel needs to be re-installed and the uis need to be recreated.

static  booleanuseSystemFonts()
     Returns true if system fonts should be used, this is only useful for windows.
static  booleanusingOcean()
     Returns true if we're using the Ocean Theme.

Field Detail
queue
static ReferenceQueue queue(Code)





Method Detail
createDefaultTheme
protected void createDefaultTheme()(Code)
Ensures the current MetalTheme is non-null . This is a cover method for getCurrentTheme .
See Also:   MetalLookAndFeel.getCurrentTheme



flushUnreferenced
static void flushUnreferenced()(Code)



getAcceleratorForeground
public static ColorUIResource getAcceleratorForeground()(Code)
Returns the accelerator foreground color of the current theme. This is a cover method for getCurrentTheme().getAcceleratorForeground() . the separator accelerator foreground color
See Also:   MetalTheme



getAcceleratorSelectedForeground
public static ColorUIResource getAcceleratorSelectedForeground()(Code)
Returns the accelerator selected foreground color of the current theme. This is a cover method for getCurrentTheme().getAcceleratorSelectedForeground() . the accelerator selected foreground color
See Also:   MetalTheme



getBlack
public static ColorUIResource getBlack()(Code)
Returns the black color of the current theme. This is a cover method for getCurrentTheme().getBlack() . the black color
See Also:   MetalTheme



getControl
public static ColorUIResource getControl()(Code)
Returns the control color of the current theme. This is a cover method for getCurrentTheme().getControl() . the control color
See Also:   MetalTheme



getControlDarkShadow
public static ColorUIResource getControlDarkShadow()(Code)
Returns the control dark shadow color of the current theme. This is a cover method for getCurrentTheme().getControlDarkShadow() . the control dark shadow color
See Also:   MetalTheme



getControlDisabled
public static ColorUIResource getControlDisabled()(Code)
Returns the control disabled color of the current theme. This is a cover method for getCurrentTheme().getControlDisabled() . the control disabled color
See Also:   MetalTheme



getControlHighlight
public static ColorUIResource getControlHighlight()(Code)
Returns the control highlight color of the current theme. This is a cover method for getCurrentTheme().getControlHighlight() . the control highlight color
See Also:   MetalTheme



getControlInfo
public static ColorUIResource getControlInfo()(Code)
Returns the control info color of the current theme. This is a cover method for getCurrentTheme().getControlInfo() . the control info color
See Also:   MetalTheme



getControlShadow
public static ColorUIResource getControlShadow()(Code)
Returns the control shadow color of the current theme. This is a cover method for getCurrentTheme().getControlShadow() . the control shadow color
See Also:   MetalTheme



getControlTextColor
public static ColorUIResource getControlTextColor()(Code)
Returns the control text color of the current theme. This is a cover method for getCurrentTheme().getControlTextColor() . the control text color
See Also:   MetalTheme



getControlTextFont
public static FontUIResource getControlTextFont()(Code)
Returns the control text font of the current theme. This is a cover method for getCurrentTheme().getControlTextColor() . the control text font
See Also:   MetalTheme



getCurrentTheme
public static MetalTheme getCurrentTheme()(Code)
Return the theme currently being used by MetalLookAndFeel. If the current theme is null , the default theme is created. the current theme
See Also:   MetalLookAndFeel.setCurrentTheme
since:
   1.5



getDefaults
public UIDefaults getDefaults()(Code)
Returns the look and feel defaults. This invokes, in order, createDefaultTheme() , super.getDefaults() and getCurrentTheme().addCustomEntriesToTable(table) .

While this method is public, it should only be invoked by the UIManager when the look and feel is set as the current look and feel and after initialize has been invoked. the look and feel defaults
See Also:   MetalLookAndFeel.createDefaultTheme
See Also:   javax.swing.plaf.basic.BasicLookAndFeel.getDefaults
See Also:   MetalTheme.addCustomEntriesToTable(UIDefaults)




getDescription
public String getDescription()(Code)
Returns a short description of this look and feel. This returns "The Java(tm) Look and Feel" . a short description for the look and feel



getDesktopColor
public static ColorUIResource getDesktopColor()(Code)
Returns the desktop color of the current theme. This is a cover method for getCurrentTheme().getDesktopColor() . the desktop color
See Also:   MetalTheme



getDisabledIcon
public Icon getDisabledIcon(JComponent component, Icon icon)(Code)
Returns an Icon with a disabled appearance. This method is used to generate a disabled Icon when one has not been specified. For example, if you create a JButton and only specify an Icon via setIcon this method will be called to generate the disabled Icon. If null is passed as icon this method returns null.

Some look and feels might not render the disabled Icon, in which case they will ignore this.
Parameters:
  component - JComponent that will display the Icon, may be null
Parameters:
  icon - Icon to generate disable icon from. Disabled icon, or null if a suitable Icon can not begenerated.
since:
   1.5




getDisabledSelectedIcon
public Icon getDisabledSelectedIcon(JComponent component, Icon icon)(Code)
Returns an Icon for use by disabled components that are also selected. This method is used to generate an Icon for components that are in both the disabled and selected states but do not have a specific Icon for this state. For example, if you create a JButton and only specify an Icon via setIcon this method will be called to generate the disabled and selected Icon. If null is passed as icon this method returns null.

Some look and feels might not render the disabled and selected Icon, in which case they will ignore this.
Parameters:
  component - JComponent that will display the Icon, may be null
Parameters:
  icon - Icon to generate disabled and selected icon from. Disabled and Selected icon, or null if a suitable Icon can notbe generated.
since:
   1.5




getFocusColor
public static ColorUIResource getFocusColor()(Code)
Returns the focus color of the current theme. This is a cover method for getCurrentTheme().getFocusColor() . the focus color
See Also:   MetalTheme



getHighlightedTextColor
public static ColorUIResource getHighlightedTextColor()(Code)
Returns the highlighted text color of the current theme. This is a cover method for getCurrentTheme().getHighlightedTextColor() . the highlighted text color
See Also:   MetalTheme



getID
public String getID()(Code)
Returns an identifier for this look and feel. This returns "Metal" . the identifier of this look and feel



getInactiveControlTextColor
public static ColorUIResource getInactiveControlTextColor()(Code)
Returns the inactive control text color of the current theme. This is a cover method for getCurrentTheme().getInactiveControlTextColor() . the inactive control text color
See Also:   MetalTheme



getInactiveSystemTextColor
public static ColorUIResource getInactiveSystemTextColor()(Code)
Returns the inactive system text color of the current theme. This is a cover method for getCurrentTheme().getInactiveSystemTextColor() . the inactive system text color
See Also:   MetalTheme



getLayoutStyle
public LayoutStyle getLayoutStyle()(Code)
Returns a LayoutStyle implementing the Java look and feel design guidelines as specified at http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html. LayoutStyle implementing the Java look and feel designguidelines
since:
   1.6



getMenuBackground
public static ColorUIResource getMenuBackground()(Code)
Returns the menu background color of the current theme. This is a cover method for getCurrentTheme().getMenuBackground() . the menu background color
See Also:   MetalTheme



getMenuDisabledForeground
public static ColorUIResource getMenuDisabledForeground()(Code)
Returns the menu disabled foreground color of the current theme. This is a cover method for getCurrentTheme().getMenuDisabledForeground() . the menu disabled foreground color
See Also:   MetalTheme



getMenuForeground
public static ColorUIResource getMenuForeground()(Code)
Returns the menu foreground color of the current theme. This is a cover method for getCurrentTheme().getMenuForeground() . the menu foreground color
See Also:   MetalTheme



getMenuSelectedBackground
public static ColorUIResource getMenuSelectedBackground()(Code)
Returns the menu selected background color of the current theme. This is a cover method for getCurrentTheme().getMenuSelectedBackground() . the menu selected background color
See Also:   MetalTheme



getMenuSelectedForeground
public static ColorUIResource getMenuSelectedForeground()(Code)
Returns the menu selected foreground color of the current theme. This is a cover method for getCurrentTheme().getMenuSelectedForeground() . the menu selected foreground color
See Also:   MetalTheme



getMenuTextFont
public static FontUIResource getMenuTextFont()(Code)
Returns the menu text font of the current theme. This is a cover method for getCurrentTheme().getMenuTextFont() . the menu text font
See Also:   MetalTheme



getName
public String getName()(Code)
Returns the name of this look and feel. This returns "Metal" . the name of this look and feel



getPrimaryControl
public static ColorUIResource getPrimaryControl()(Code)
Returns the primary control color of the current theme. This is a cover method for getCurrentTheme().getPrimaryControl() . the primary control color
See Also:   MetalTheme



getPrimaryControlDarkShadow
public static ColorUIResource getPrimaryControlDarkShadow()(Code)
Returns the primary control dark shadow color of the current theme. This is a cover method for getCurrentTheme().getPrimaryControlDarkShadow() . the primary control dark shadow color
See Also:   MetalTheme



getPrimaryControlHighlight
public static ColorUIResource getPrimaryControlHighlight()(Code)
Returns the primary control highlight color of the current theme. This is a cover method for getCurrentTheme().getPrimaryControlHighlight() . the primary control highlight color
See Also:   MetalTheme



getPrimaryControlInfo
public static ColorUIResource getPrimaryControlInfo()(Code)
Returns the primary control info color of the current theme. This is a cover method for getCurrentTheme().getPrimaryControlInfo() . the primary control info color
See Also:   MetalTheme



getPrimaryControlShadow
public static ColorUIResource getPrimaryControlShadow()(Code)
Returns the primary control shadow color of the current theme. This is a cover method for getCurrentTheme().getPrimaryControlShadow() . the primary control shadow color
See Also:   MetalTheme



getSeparatorBackground
public static ColorUIResource getSeparatorBackground()(Code)
Returns the separator background color of the current theme. This is a cover method for getCurrentTheme().getSeparatorBackground() . the separator background color
See Also:   MetalTheme



getSeparatorForeground
public static ColorUIResource getSeparatorForeground()(Code)
Returns the separator foreground color of the current theme. This is a cover method for getCurrentTheme().getSeparatorForeground() . the separator foreground color
See Also:   MetalTheme



getSubTextFont
public static FontUIResource getSubTextFont()(Code)
Returns the sub-text font of the current theme. This is a cover method for getCurrentTheme().getSubTextFont() . the sub-text font
See Also:   MetalTheme



getSupportsWindowDecorations
public boolean getSupportsWindowDecorations()(Code)
Returns true ; metal can provide Window decorations. true
See Also:   JDialog.setDefaultLookAndFeelDecorated
See Also:   JFrame.setDefaultLookAndFeelDecorated
See Also:   JRootPane.setWindowDecorationStyle
since:
   1.4



getSystemTextColor
public static ColorUIResource getSystemTextColor()(Code)
Returns the system text color of the current theme. This is a cover method for getCurrentTheme().getSystemTextColor() . the system text color
See Also:   MetalTheme



getSystemTextFont
public static FontUIResource getSystemTextFont()(Code)
Returns the sytem text font of the current theme. This is a cover method for getCurrentTheme().getSystemTextFont() . the system text font
See Also:   MetalTheme



getTextHighlightColor
public static ColorUIResource getTextHighlightColor()(Code)
Returns the text highlight color of the current theme. This is a cover method for getCurrentTheme().getTextHighlightColor() . the text highlight color
See Also:   MetalTheme



getUserTextColor
public static ColorUIResource getUserTextColor()(Code)
Returns the user text color of the current theme. This is a cover method for getCurrentTheme().getUserTextColor() . the user text color
See Also:   MetalTheme



getUserTextFont
public static FontUIResource getUserTextFont()(Code)
Returns the user text font of the current theme. This is a cover method for getCurrentTheme().getUserTextFont() . the user text font
See Also:   MetalTheme



getWhite
public static ColorUIResource getWhite()(Code)
Returns the white color of the current theme. This is a cover method for getCurrentTheme().getWhite() . the white color
See Also:   MetalTheme



getWindowBackground
public static ColorUIResource getWindowBackground()(Code)
Returns the window background color of the current theme. This is a cover method for getCurrentTheme().getWindowBackground() . the window background color
See Also:   MetalTheme



getWindowTitleBackground
public static ColorUIResource getWindowTitleBackground()(Code)
Returns the window title background color of the current theme. This is a cover method for getCurrentTheme().getWindowTitleBackground() . the window title background color
See Also:   MetalTheme



getWindowTitleFont
public static FontUIResource getWindowTitleFont()(Code)
Returns the window title font of the current theme. This is a cover method for getCurrentTheme().getWindowTitleFont() . the window title font
See Also:   MetalTheme



getWindowTitleForeground
public static ColorUIResource getWindowTitleForeground()(Code)
Returns the window title foreground color of the current theme. This is a cover method for getCurrentTheme().getWindowTitleForeground() . the window title foreground color
See Also:   MetalTheme



getWindowTitleInactiveBackground
public static ColorUIResource getWindowTitleInactiveBackground()(Code)
Returns the window title inactive background color of the current theme. This is a cover method for getCurrentTheme().getWindowTitleInactiveBackground() . the window title inactive background color
See Also:   MetalTheme



getWindowTitleInactiveForeground
public static ColorUIResource getWindowTitleInactiveForeground()(Code)
Returns the window title inactive foreground color of the current theme. This is a cover method for getCurrentTheme().getWindowTitleInactiveForeground() . the window title inactive foreground color
See Also:   MetalTheme



initClassDefaults
protected void initClassDefaults(UIDefaults table)(Code)
Populates table with mappings from uiClassID to the fully qualified name of the ui class. MetalLookAndFeel registers an entry for each of the classes in the package javax.swing.plaf.metal that are named MetalXXXUI. The string XXX is one of Swing's uiClassIDs. For the uiClassIDs that do not have a class in metal, the corresponding class in javax.swing.plaf.basic is used. For example, metal does not have a class named "MetalColorChooserUI" , as such, javax.swing.plaf.basic.BasicColorChooserUI is used.
Parameters:
  table - the UIDefaults instance the entries areadded to
throws:
  NullPointerException - if table is null
See Also:   javax.swing.plaf.basic.BasicLookAndFeel.initClassDefaults



initComponentDefaults
protected void initComponentDefaults(UIDefaults table)(Code)
Populates table with the defaults for metal.
Parameters:
  table - the UIDefaults to add the values to
throws:
  NullPointerException - if table is null



initSystemColorDefaults
protected void initSystemColorDefaults(UIDefaults table)(Code)
Populates table with system colors. The following values are added to table :
Key Value
"desktop" theme.getDesktopColor()
"activeCaption" theme.getWindowTitleBackground()
"activeCaptionText" theme.getWindowTitleForeground()
"activeCaptionBorder" theme.getPrimaryControlShadow()
"inactiveCaption" theme.getWindowTitleInactiveBackground()
"inactiveCaptionText" theme.getWindowTitleInactiveForeground()
"inactiveCaptionBorder" theme.getControlShadow()
"window" theme.getWindowBackground()
"windowBorder" theme.getControl()
"windowText" theme.getUserTextColor()
"menu" theme.getMenuBackground()
"menuText" theme.getMenuForeground()
"text" theme.getWindowBackground()
"textText" theme.getUserTextColor()
"textHighlight" theme.getTextHighlightColor()
"textHighlightText" theme.getHighlightedTextColor()
"textInactiveText" theme.getInactiveSystemTextColor()
"control" theme.getControl()
"controlText" theme.getControlTextColor()
"controlHighlight" theme.getControlHighlight()
"controlLtHighlight" theme.getControlHighlight()
"controlShadow" theme.getControlShadow()
"controlDkShadow" theme.getControlDarkShadow()
"scrollbar" theme.getControl()
"info" theme.getPrimaryControl()
"infoText" theme.getPrimaryControlInfo()
The value theme corresponds to the current MetalTheme .
Parameters:
  table - the UIDefaults object the values are added to
throws:
  NullPointerException - if table is null



isNativeLookAndFeel
public boolean isNativeLookAndFeel()(Code)
Returns false ; MetalLookAndFeel is not a native look and feel. false



isSupportedLookAndFeel
public boolean isSupportedLookAndFeel()(Code)
Returns true ; MetalLookAndFeel can be run on any platform. true



isWindows
static boolean isWindows()(Code)
Returns true if running on Windows.



provideErrorFeedback
public void provideErrorFeedback(Component component)(Code)

since:
   1.4



setCurrentTheme
public static void setCurrentTheme(MetalTheme theme)(Code)
Set the theme used by MetalLookAndFeel.

After the theme is set, MetalLookAndFeel needs to be re-installed and the uis need to be recreated. The following shows how to do this:

 MetalLookAndFeel.setCurrentTheme(theme);
 // re-install the Metal Look and Feel
 UIManager.setLookAndFeel(new MetalLookAndFeel());
 // Update the ComponentUIs for all Components. This
 // needs to be invoked for all windows.
 SwingUtilities.updateComponentTreeUI(rootComponent);
 
If this is not done the results are undefined.
Parameters:
  theme - the theme to use
throws:
  NullPointerException - if theme is null
See Also:   MetalLookAndFeel.getCurrentTheme



useSystemFonts
static boolean useSystemFonts()(Code)
Returns true if system fonts should be used, this is only useful for windows.



usingOcean
static boolean usingOcean()(Code)
Returns true if we're using the Ocean Theme.



Methods inherited from javax.swing.plaf.basic.BasicLookAndFeel
protected Action createAudioAction(Object key)(Code)(Java Doc)
protected ActionMap getAudioActionMap()(Code)(Java Doc)
public UIDefaults getDefaults()(Code)(Java Doc)
protected void initClassDefaults(UIDefaults table)(Code)(Java Doc)
protected void initComponentDefaults(UIDefaults table)(Code)(Java Doc)
protected void initSystemColorDefaults(UIDefaults table)(Code)(Java Doc)
public void initialize()(Code)(Java Doc)
protected void loadSystemColors(UIDefaults table, String[] systemColors, boolean useNative)(Code)(Java Doc)
protected void playSound(Action audioAction)(Code)(Java Doc)
public void uninitialize()(Code)(Java Doc)

Methods inherited from javax.swing.LookAndFeel
public UIDefaults getDefaults()(Code)(Java Doc)
abstract public String getDescription()(Code)(Java Doc)
public static Object getDesktopPropertyValue(String systemPropertyName, Object fallbackValue)(Code)(Java Doc)
public Icon getDisabledIcon(JComponent component, Icon icon)(Code)(Java Doc)
public Icon getDisabledSelectedIcon(JComponent component, Icon icon)(Code)(Java Doc)
abstract public String getID()(Code)(Java Doc)
public LayoutStyle getLayoutStyle()(Code)(Java Doc)
abstract public String getName()(Code)(Java Doc)
public boolean getSupportsWindowDecorations()(Code)(Java Doc)
public void initialize()(Code)(Java Doc)
public static void installBorder(JComponent c, String defaultBorderName)(Code)(Java Doc)
public static void installColors(JComponent c, String defaultBgName, String defaultFgName)(Code)(Java Doc)
public static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName)(Code)(Java Doc)
public static void installProperty(JComponent c, String propertyName, Object propertyValue)(Code)(Java Doc)
abstract public boolean isNativeLookAndFeel()(Code)(Java Doc)
abstract public boolean isSupportedLookAndFeel()(Code)(Java Doc)
public static void loadKeyBindings(InputMap retMap, Object[] keys)(Code)(Java Doc)
public static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys)(Code)(Java Doc)
public static Object makeIcon(Class baseClass, String gifFile)(Code)(Java Doc)
public static InputMap makeInputMap(Object[] keys)(Code)(Java Doc)
public static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList)(Code)(Java Doc)
public void provideErrorFeedback(Component component)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void uninitialize()(Code)(Java Doc)
public static void uninstallBorder(JComponent c)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.