Java Doc for DefaultMetalTheme.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.plaf.metal.MetalTheme
      javax.swing.plaf.metal.DefaultMetalTheme

All known Subclasses:   javax.swing.plaf.metal.OceanTheme,  javax.swing.plaf.metal.MetalHighContrastTheme,
DefaultMetalTheme
public class DefaultMetalTheme extends MetalTheme (Code)
A concrete implementation of MetalTheme providing the original look of the Java Look and Feel, code-named "Steel". Refer to MetalLookAndFeel.setCurrentTheme for details on changing the default theme.

All colors returned by DefaultMetalTheme are completely opaque.

Font Style

DefaultMetalTheme uses bold fonts for many controls. To make all controls (with the exception of the internal frame title bars and client decorated frame title bars) use plain fonts you can do either of the following:
  • Set the system property swing.boldMetal to false. For example, java -Dswing.boldMetal=false MyApp.
  • Set the defaults property swing.boldMetal to Boolean.FALSE. For example: UIManager.put("swing.boldMetal", Boolean.FALSE);
The defaults property swing.boldMetal, if set, takes precendence over the system property of the same name. After setting this defaults property you need to re-install MetalLookAndFeel, as well as update the UI of any previously created widgets. Otherwise the results are undefined. The following illustrates how to do this:
 // turn off bold fonts
 UIManager.put("swing.boldMetal", Boolean.FALSE);
 // 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);
 

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:   MetalLookAndFeel
See Also:   MetalLookAndFeel.setCurrentTheme
version:
   1.37 05/05/07
author:
   Steve Wilson




Constructor Summary
public  DefaultMetalTheme()
     Creates and returns an instance of DefaultMetalTheme .

Method Summary
public  FontUIResourcegetControlTextFont()
     Returns the control text font.
static  StringgetDefaultFontName(int key)
     Returns the ideal font name for the font identified by key.
static  intgetDefaultFontSize(int key)
     Returns the ideal font size for the font identified by key.
static  intgetDefaultFontStyle(int key)
     Returns the ideal font style for the font identified by key.
static  StringgetDefaultPropertyName(int key)
     Returns the default used to look up the specified font.
public  FontUIResourcegetMenuTextFont()
     Returns the menu text font.
public  StringgetName()
     Returns the name of this theme.
protected  ColorUIResourcegetPrimary1()
     Returns the primary 1 color.
protected  ColorUIResourcegetPrimary2()
     Returns the primary 2 color.
protected  ColorUIResourcegetPrimary3()
     Returns the primary 3 color.
protected  ColorUIResourcegetSecondary1()
     Returns the secondary 1 color.
protected  ColorUIResourcegetSecondary2()
     Returns the secondary 2 color.
protected  ColorUIResourcegetSecondary3()
     Returns the secondary 3 color.
public  FontUIResourcegetSubTextFont()
     Returns the sub-text font.
public  FontUIResourcegetSystemTextFont()
     Returns the system text font.
public  FontUIResourcegetUserTextFont()
     Returns the user text font.
public  FontUIResourcegetWindowTitleFont()
     Returns the window title font.
 voidinstall()
    
 booleanisSystemTheme()
     Returns true if this is a theme provided by the core platform.


Constructor Detail
DefaultMetalTheme
public DefaultMetalTheme()(Code)
Creates and returns an instance of DefaultMetalTheme .




Method Detail
getControlTextFont
public FontUIResource getControlTextFont()(Code)
Returns the control text font. This returns Dialog, 12pt. If plain fonts have been enabled as described in font style, the font style is plain. Otherwise the font style is bold. the control text font



getDefaultFontName
static String getDefaultFontName(int key)(Code)
Returns the ideal font name for the font identified by key.



getDefaultFontSize
static int getDefaultFontSize(int key)(Code)
Returns the ideal font size for the font identified by key.



getDefaultFontStyle
static int getDefaultFontStyle(int key)(Code)
Returns the ideal font style for the font identified by key.



getDefaultPropertyName
static String getDefaultPropertyName(int key)(Code)
Returns the default used to look up the specified font.



getMenuTextFont
public FontUIResource getMenuTextFont()(Code)
Returns the menu text font. This returns Dialog, 12pt. If plain fonts have been enabled as described in font style, the font style is plain. Otherwise the font style is bold. the menu text font



getName
public String getName()(Code)
Returns the name of this theme. This returns "Steel" . the name of this theme.



getPrimary1
protected ColorUIResource getPrimary1()(Code)
Returns the primary 1 color. This returns a color with rgb values of 102, 102, and 153, respectively. the primary 1 color



getPrimary2
protected ColorUIResource getPrimary2()(Code)
Returns the primary 2 color. This returns a color with rgb values of 153, 153, 204, respectively. the primary 2 color



getPrimary3
protected ColorUIResource getPrimary3()(Code)
Returns the primary 3 color. This returns a color with rgb values 204, 204, 255, respectively. the primary 3 color



getSecondary1
protected ColorUIResource getSecondary1()(Code)
Returns the secondary 1 color. This returns a color with rgb values 102, 102, and 102, respectively. the secondary 1 color



getSecondary2
protected ColorUIResource getSecondary2()(Code)
Returns the secondary 2 color. This returns a color with rgb values 153, 153, and 153, respectively. the secondary 2 color



getSecondary3
protected ColorUIResource getSecondary3()(Code)
Returns the secondary 3 color. This returns a color with rgb values 204, 204, and 204, respectively. the secondary 3 color



getSubTextFont
public FontUIResource getSubTextFont()(Code)
Returns the sub-text font. This returns Dialog, 10pt, plain. the sub-text font



getSystemTextFont
public FontUIResource getSystemTextFont()(Code)
Returns the system text font. This returns Dialog, 12pt, plain. the sytem text font



getUserTextFont
public FontUIResource getUserTextFont()(Code)
Returns the user text font. This returns Dialog, 12pt, plain. the user text font



getWindowTitleFont
public FontUIResource getWindowTitleFont()(Code)
Returns the window title font. This returns Dialog, 12pt, bold. the window title font



install
void install()(Code)



isSystemTheme
boolean isSystemTheme()(Code)
Returns true if this is a theme provided by the core platform.



Fields inherited from javax.swing.plaf.metal.MetalTheme
final static int CONTROL_TEXT_FONT(Code)(Java Doc)
final static int MENU_TEXT_FONT(Code)(Java Doc)
final static int SUB_TEXT_FONT(Code)(Java Doc)
final static int SYSTEM_TEXT_FONT(Code)(Java Doc)
final static int USER_TEXT_FONT(Code)(Java Doc)
final static int WINDOW_TITLE_FONT(Code)(Java Doc)
static ColorUIResource white(Code)(Java Doc)

Methods inherited from javax.swing.plaf.metal.MetalTheme
public void addCustomEntriesToTable(UIDefaults table)(Code)(Java Doc)
public ColorUIResource getAcceleratorForeground()(Code)(Java Doc)
public ColorUIResource getAcceleratorSelectedForeground()(Code)(Java Doc)
protected ColorUIResource getBlack()(Code)(Java Doc)
public ColorUIResource getControl()(Code)(Java Doc)
public ColorUIResource getControlDarkShadow()(Code)(Java Doc)
public ColorUIResource getControlDisabled()(Code)(Java Doc)
public ColorUIResource getControlHighlight()(Code)(Java Doc)
public ColorUIResource getControlInfo()(Code)(Java Doc)
public ColorUIResource getControlShadow()(Code)(Java Doc)
public ColorUIResource getControlTextColor()(Code)(Java Doc)
abstract public FontUIResource getControlTextFont()(Code)(Java Doc)
public ColorUIResource getDesktopColor()(Code)(Java Doc)
public ColorUIResource getFocusColor()(Code)(Java Doc)
public ColorUIResource getHighlightedTextColor()(Code)(Java Doc)
public ColorUIResource getInactiveControlTextColor()(Code)(Java Doc)
public ColorUIResource getInactiveSystemTextColor()(Code)(Java Doc)
public ColorUIResource getMenuBackground()(Code)(Java Doc)
public ColorUIResource getMenuDisabledForeground()(Code)(Java Doc)
public ColorUIResource getMenuForeground()(Code)(Java Doc)
public ColorUIResource getMenuSelectedBackground()(Code)(Java Doc)
public ColorUIResource getMenuSelectedForeground()(Code)(Java Doc)
abstract public FontUIResource getMenuTextFont()(Code)(Java Doc)
abstract public String getName()(Code)(Java Doc)
abstract protected ColorUIResource getPrimary1()(Code)(Java Doc)
abstract protected ColorUIResource getPrimary2()(Code)(Java Doc)
abstract protected ColorUIResource getPrimary3()(Code)(Java Doc)
public ColorUIResource getPrimaryControl()(Code)(Java Doc)
public ColorUIResource getPrimaryControlDarkShadow()(Code)(Java Doc)
public ColorUIResource getPrimaryControlHighlight()(Code)(Java Doc)
public ColorUIResource getPrimaryControlInfo()(Code)(Java Doc)
public ColorUIResource getPrimaryControlShadow()(Code)(Java Doc)
abstract protected ColorUIResource getSecondary1()(Code)(Java Doc)
abstract protected ColorUIResource getSecondary2()(Code)(Java Doc)
abstract protected ColorUIResource getSecondary3()(Code)(Java Doc)
public ColorUIResource getSeparatorBackground()(Code)(Java Doc)
public ColorUIResource getSeparatorForeground()(Code)(Java Doc)
abstract public FontUIResource getSubTextFont()(Code)(Java Doc)
public ColorUIResource getSystemTextColor()(Code)(Java Doc)
abstract public FontUIResource getSystemTextFont()(Code)(Java Doc)
public ColorUIResource getTextHighlightColor()(Code)(Java Doc)
public ColorUIResource getUserTextColor()(Code)(Java Doc)
abstract public FontUIResource getUserTextFont()(Code)(Java Doc)
protected ColorUIResource getWhite()(Code)(Java Doc)
public ColorUIResource getWindowBackground()(Code)(Java Doc)
public ColorUIResource getWindowTitleBackground()(Code)(Java Doc)
abstract public FontUIResource getWindowTitleFont()(Code)(Java Doc)
public ColorUIResource getWindowTitleForeground()(Code)(Java Doc)
public ColorUIResource getWindowTitleInactiveBackground()(Code)(Java Doc)
public ColorUIResource getWindowTitleInactiveForeground()(Code)(Java Doc)
void install()(Code)(Java Doc)
boolean isSystemTheme()(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.