当前页面:
在线文档首页 >
JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档
Java(TM) 2 Platform, Standard Edition, v1.2.2 API Specification: Class MetalLookAndFeel - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档
javax.swing.plaf.metal
Class MetalLookAndFeel
java.lang.Object
|
+--javax.swing.LookAndFeel
|
+--javax.swing.plaf.basic.BasicLookAndFeel
|
+--javax.swing.plaf.metal.MetalLookAndFeel
- public class MetalLookAndFeel
- extends BasicLookAndFeel
Implements The Metal Look and Feel.
For the keyboard keys defined for each component in this Look and
Feel (L&F), see
Component Keystroke Actions for the Metal L&F.
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. A future release of Swing will provide support for
long term persistence.
- See Also:
- Serialized Form
MetalLookAndFeel
public MetalLookAndFeel()
getName
public String getName()
- Description copied from class: LookAndFeel
- Return a short string that identifies this look and feel, e.g.
"CDE/Motif". This string should be appropriate for a menu item.
Distinct look and feels should have different names, e.g.
a subclass of MotifLookAndFeel that changes the way a few components
are rendered should be called "CDE/Motif My Way"; something
that would be useful to a user trying to select a L&F from a list
of names.
- Overrides:
- getName in class LookAndFeel
getID
public String getID()
- Description copied from class: LookAndFeel
- Return a string that identifies this look and feel. This string
will be used by applications/services that want to recognize
well known look and feel implementations. Presently
the well known names are "Motif", "Windows", "Mac", "Metal". Note
that a LookAndFeel derived from a well known superclass
that doesn't make any fundamental changes to the look or feel
shouldn't override this method.
- Overrides:
- getID in class LookAndFeel
getDescription
public String getDescription()
- Description copied from class: LookAndFeel
- Return a one line description of this look and feel implementation,
e.g. "The CDE/Motif Look and Feel". This string is intended for
the user, e.g. in the title of a window or in a ToolTip message.
- Overrides:
- getDescription in class LookAndFeel
isNativeLookAndFeel
public boolean isNativeLookAndFeel()
- Description copied from class: LookAndFeel
- If the underlying platform has a "native" look and feel, and this
is an implementation of it, return true. For example a CDE/Motif
look and implementation would return true when the underlying
platform was Solaris.
- Overrides:
- isNativeLookAndFeel in class LookAndFeel
isSupportedLookAndFeel
public boolean isSupportedLookAndFeel()
- Description copied from class: LookAndFeel
- Return true if the underlying platform supports and or permits
this look and feel. This method returns false if the look
and feel depends on special resources or legal agreements that
aren't defined for the current platform.
- Overrides:
- isSupportedLookAndFeel in class LookAndFeel
- Tags copied from class: LookAndFeel
- See Also:
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
initClassDefaults
protected void initClassDefaults(UIDefaults table)
- Initialize the uiClassID to BasicComponentUI mapping.
The JComponent classes define their own uiClassID constants
(see AbstractComponent.getUIClassID). This table must
map those constants to a BasicComponentUI class of the
appropriate type.
- Overrides:
- initClassDefaults in class BasicLookAndFeel
- See Also:
BasicLookAndFeel.getDefaults()
initSystemColorDefaults
protected void initSystemColorDefaults(UIDefaults table)
- Load the SystemColors into the defaults table. The keys
for SystemColor defaults are the same as the names of
the public fields in SystemColor.
- Overrides:
- initSystemColorDefaults in class BasicLookAndFeel
initComponentDefaults
protected void initComponentDefaults(UIDefaults table)
- Overrides:
- initComponentDefaults in class BasicLookAndFeel
createDefaultTheme
protected void createDefaultTheme()
getDefaults
public UIDefaults getDefaults()
- Description copied from class: LookAndFeel
- This method is called once by UIManager.setLookAndFeel to create
the look and feel specific defaults table. Other applications,
for example an application builder, may also call this method.
- Overrides:
- getDefaults in class BasicLookAndFeel
- Tags copied from class: LookAndFeel
- See Also:
LookAndFeel.initialize()
,
LookAndFeel.uninitialize()
,
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
setCurrentTheme
public static void setCurrentTheme(MetalTheme theme)
getControlTextFont
public static FontUIResource getControlTextFont()
getSystemTextFont
public static FontUIResource getSystemTextFont()
getUserTextFont
public static FontUIResource getUserTextFont()
getMenuTextFont
public static FontUIResource getMenuTextFont()
getWindowTitleFont
public static FontUIResource getWindowTitleFont()
getSubTextFont
public static FontUIResource getSubTextFont()
getDesktopColor
public static ColorUIResource getDesktopColor()
getFocusColor
public static ColorUIResource getFocusColor()
getWhite
public static ColorUIResource getWhite()
getBlack
public static ColorUIResource getBlack()
getControl
public static ColorUIResource getControl()
getControlShadow
public static ColorUIResource getControlShadow()
getControlDarkShadow
public static ColorUIResource getControlDarkShadow()
getControlInfo
public static ColorUIResource getControlInfo()
getControlHighlight
public static ColorUIResource getControlHighlight()
getControlDisabled
public static ColorUIResource getControlDisabled()
getPrimaryControl
public static ColorUIResource getPrimaryControl()
getPrimaryControlShadow
public static ColorUIResource getPrimaryControlShadow()
getPrimaryControlDarkShadow
public static ColorUIResource getPrimaryControlDarkShadow()
getPrimaryControlInfo
public static ColorUIResource getPrimaryControlInfo()
getPrimaryControlHighlight
public static ColorUIResource getPrimaryControlHighlight()
getSystemTextColor
public static ColorUIResource getSystemTextColor()
getControlTextColor
public static ColorUIResource getControlTextColor()
getInactiveControlTextColor
public static ColorUIResource getInactiveControlTextColor()
getInactiveSystemTextColor
public static ColorUIResource getInactiveSystemTextColor()
getUserTextColor
public static ColorUIResource getUserTextColor()
getTextHighlightColor
public static ColorUIResource getTextHighlightColor()
getHighlightedTextColor
public static ColorUIResource getHighlightedTextColor()
getWindowBackground
public static ColorUIResource getWindowBackground()
getWindowTitleBackground
public static ColorUIResource getWindowTitleBackground()
getWindowTitleForeground
public static ColorUIResource getWindowTitleForeground()
getWindowTitleInactiveBackground
public static ColorUIResource getWindowTitleInactiveBackground()
getWindowTitleInactiveForeground
public static ColorUIResource getWindowTitleInactiveForeground()
getMenuBackground
public static ColorUIResource getMenuBackground()
getMenuForeground
public static ColorUIResource getMenuForeground()
getMenuSelectedBackground
public static ColorUIResource getMenuSelectedBackground()
getMenuSelectedForeground
public static ColorUIResource getMenuSelectedForeground()
getMenuDisabledForeground
public static ColorUIResource getMenuDisabledForeground()
getSeparatorBackground
public static ColorUIResource getSeparatorBackground()
getSeparatorForeground
public static ColorUIResource getSeparatorForeground()
getAcceleratorForeground
public static ColorUIResource getAcceleratorForeground()
getAcceleratorSelectedForeground
public static ColorUIResource getAcceleratorSelectedForeground()
Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.