java.lang.Object | ||||
↳ | javax.swing.LookAndFeel | |||
↳ | javax.swing.plaf.basic.BasicLookAndFeel | |||
↳ | javax.swing.plaf.synth.SynthLookAndFeel | |||
↳ | com.sun.java.swing.plaf.gtk.GTKLookAndFeel |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the GTK look and feel class for the passed in Component.
| |||||||||||
Returns the defaults for this SynthLookAndFeel.
| |||||||||||
Returns a textual description of SynthLookAndFeel.
| |||||||||||
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.
| |||||||||||
Called by UIManager when this look and feel is installed.
| |||||||||||
Returns false, SynthLookAndFeel is not a native look and feel.
| |||||||||||
Returns true, SynthLookAndFeel is always supported.
| |||||||||||
Returns whether or not the UIs should update their
SynthStyles from the SynthStyleFactory
when the ancestor of the Component changes. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Populates
table with the defaults for the basic look and
feel. | |||||||||||
Populates
table with system colors. | |||||||||||
Populates
table with the name-color pairs in
systemColors . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
javax.swing.plaf.synth.SynthLookAndFeel
| |||||||||||
From class
javax.swing.plaf.basic.BasicLookAndFeel
| |||||||||||
From class
javax.swing.LookAndFeel
| |||||||||||
From class
java.lang.Object
|
Creates the GTK look and feel class for the passed in Component.
Returns the defaults for this SynthLookAndFeel.
Returns a textual description of SynthLookAndFeel.
Return a string that identifies this look and feel.
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.
Called by UIManager when this look and feel is installed.
Returns false, SynthLookAndFeel is not a native look and feel.
Returns true, SynthLookAndFeel is always supported.
Returns whether or not the UIs should update their
SynthStyles
from the SynthStyleFactory
when the ancestor of the Component changes.
SynthStyles
from the SynthStyleFactory
when the ancestor changed.
Populates table
with the defaults for the basic look and
feel.
table | the UIDefaults to add the values to |
---|
Populates table
with system colors. This creates an
array of name-color
pairs and invokes loadSystemColors
.
The name is a String
that corresponds to the name of
one of the static SystemColor
fields in the SystemColor
class. A name-color pair is created for every
such SystemColor
field.
The color
corresponds to a hex String
as
understood by Color.decode
. For example, one of the
name-color
pairs is "desktop"-"#005C5C"
. This corresponds to the SystemColor
field desktop
, with a color value of
new Color(0x005C5C)
.
The following shows two of the name-color
pairs:
String[] nameColorPairs = new String[] { "desktop", "#005C5C", "activeCaption", "#000080" }; loadSystemColors(table, nameColorPairs, isNativeLookAndFeel());As previously stated, this invokes
loadSystemColors
with the supplied table
and name-color
pair
array. The last argument to loadSystemColors
indicates
whether the value of the field in SystemColor
should be
used. This method passes the value of isNativeLookAndFeel()
as the last argument to loadSystemColors
.table | the UIDefaults object the values are added to |
---|
Populates table
with the name-color
pairs in
systemColors
. Refer to
initSystemColorDefaults(UIDefaults)
for details on
the format of systemColors
.
An entry is added to table
for each of the name-color
pairs in systemColors
. The entry key is
the name
of the name-color
pair.
The value of the entry corresponds to the color
of the
name-color
pair. The value of the entry is calculated
in one of two ways. With either approach the value is always a
ColorUIResource
.
If useNative
is false
, the color
is
created by using Color.decode
to convert the String
into a Color
. If decode
can not convert
the String
into a Color
(NumberFormatException
is thrown) then a ColorUIResource
of black is used.
If useNative
is true
, the color
is the
value of the field in SystemColor
with the same name as
the name
of the name-color
pair. If the field
is not valid, a ColorUIResource
of black is used.
table | the UIDefaults object the values are added to |
---|---|
systemColors | array of name-color pairs as described
in initSystemColorDefaults(UIDefaults) |
useNative | whether the color is obtained from SystemColor
or Color.decode |