java.lang.Object | |||
↳ | javax.swing.LookAndFeel | ||
↳ | javax.swing.plaf.basic.BasicLookAndFeel | ||
↳ | com.sun.java.swing.plaf.windows.WindowsLookAndFeel |
Known Direct Subclasses |
Implements the Windows95/98/NT/2000 Look and Feel. UI classes not implemented specifically for Windows will default to those implemented in Basic.
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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a one line description of this look and feel implementation,
e.g.
| |||||||||||
Returns an
Icon with a disabled appearance. | |||||||||||
Return a string that identifies this look and feel.
| |||||||||||
Returns the
LayoutStyle for this look
and feel.
| |||||||||||
Return a short string that identifies this look and feel, e.g.
| |||||||||||
Initializes the look and feel.
| |||||||||||
Gets the state of the flag which indicates if the old Windows
look and feel should be rendered.
| |||||||||||
Gets the state of the hide mnemonic flag.
| |||||||||||
If the underlying platform has a "native" look and feel, and
this is an implementation of it, return
true . | |||||||||||
Return
true if the underlying platform supports and or permits
this look and feel. | |||||||||||
Invoked when the user attempts an invalid operation,
such as pasting into an uneditable | |||||||||||
Sets the state of the hide mnemonic flag.
| |||||||||||
Uninitializes the look and feel.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an
Action . | |||||||||||
Initialize the uiClassID to BasicComponentUI mapping.
| |||||||||||
Populates
table with the defaults for the basic look and
feel. | |||||||||||
Load the SystemColors into the defaults table.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
javax.swing.plaf.basic.BasicLookAndFeel
| |||||||||||
From class
javax.swing.LookAndFeel
| |||||||||||
From class
java.lang.Object
|
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.
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.
component | JComponent that will display the Icon ,
may be null |
---|---|
icon | Icon to generate the disabled icon from |
Icon
, or null
if a suitable
Icon
can not be generatedReturn 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.
Returns the LayoutStyle
for this look
and feel. This never returns null
.
You generally don't use the LayoutStyle
from
the look and feel, instead use the LayoutStyle
method getInstance
.
LayoutStyle
for this look and feelReturn 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.
Initializes the look and feel. While this method is public,
it should only be invoked by the UIManager
when a
look and feel is installed as the current look and feel. This
method is invoked before the UIManager
invokes
getDefaults
. This method is intended to perform any
initialization for the look and feel. Subclasses
should do any one-time setup they need here, rather than
in a static initializer, because look and feel class objects
may be loaded just to discover that isSupportedLookAndFeel()
returns false
.
Gets the state of the flag which indicates if the old Windows look and feel should be rendered. This flag is used by the component UI delegates as a hint to determine which style the component should be rendered.
Gets the state of the hide mnemonic flag. This only has meaning if this feature is supported by the underlying OS.
If the underlying platform has a "native" look and feel, and
this is an implementation of it, return true
. For
example, when the underlying platform is Solaris running CDE
a CDE/Motif look and feel implementation would return true
.
true
if this look and feel represents the underlying
platform look and feel
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.
true
if this is a supported look and feel
Invoked when the user attempts an invalid operation,
such as pasting into an uneditable JTextField
that has focus.
If the user has enabled visual error indication on the desktop, this method will flash the caption bar of the active window. The user can also set the property awt.visualbell=true to achieve the same results.
component | Component the error occured in, may be
null indicating the error condition is
not directly associated with a
Component . |
---|
Sets the state of the hide mnemonic flag. This flag is used by the component UI delegates to determine if the mnemonic should be rendered. This method is a non operation if the underlying operating system does not support the mnemonic hiding feature.
hide | true if mnemonics should be hidden |
---|
Uninitializes the look and feel. While this method is public,
it should only be invoked by the UIManager
when
the look and feel is uninstalled. For example,
UIManager.setLookAndFeel
invokes this when the look and
feel is changed.
Subclasses may choose to free up some resources here.
Returns an Action
.
This Action contains the information and logic to render an
auditory cue. The Object
that is passed to this
method contains the information needed to render the auditory
cue. Normally, this Object
is a String
that points to a Toolkit
desktopProperty
.
This desktopProperty
is resolved by AWT and the
Windows OS.
This Action
's actionPerformed
method
is fired by the playSound
method.
key | the key identifying the audio action |
---|
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.
table | the UIDefaults instance the entries are
added to |
---|
Populates table
with the defaults for the basic look and
feel.
table | the UIDefaults to add the values to |
---|
Load the SystemColors into the defaults table. The keys for SystemColor defaults are the same as the names of the public fields in SystemColor. If the table is being created on a native Windows platform we use the SystemColor values, otherwise we create color objects whose values match the defaults Windows95 colors.
table | the UIDefaults object the values are added to |
---|