java.lang.Object | |||
↳ | javax.swing.LookAndFeel | ||
↳ | javax.swing.plaf.basic.BasicLookAndFeel | ||
↳ | javax.swing.plaf.synth.SynthLookAndFeel |
![]() |
SynthLookAndFeel provides the basis for creating a customized look and
feel. SynthLookAndFeel does not directly provide a look, all painting is
delegated.
You need to either provide a configuration file, by way of the
load(InputStream, Class>)
method, or provide your own SynthStyleFactory
to setStyleFactory(SynthStyleFactory)
. Refer to the
package summary for an example of
loading a file, and SynthStyleFactory
for
an example of providing your own SynthStyleFactory
to
setStyleFactory
.
Warning:
This class implements Serializable
as a side effect of it
extending BasicLookAndFeel
. It is not intended to be serialized.
An attempt to serialize it will
result in NotSerializableException
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a SynthLookAndFeel.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the Synth look and feel
ComponentUI for
the passed in JComponent . | |||||||||||
Returns the defaults for this SynthLookAndFeel.
| |||||||||||
Returns a textual description of SynthLookAndFeel.
| |||||||||||
Return a string that identifies this look and feel.
| |||||||||||
Return a short string that identifies this look and feel.
| |||||||||||
Returns the Region for the JComponent
c . | |||||||||||
Gets a SynthStyle for the specified region of the specified component.
| |||||||||||
Returns the current SynthStyleFactory.
| |||||||||||
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.
| |||||||||||
Loads the set of
SynthStyle s that will be used by
this SynthLookAndFeel . | |||||||||||
Loads the set of
SynthStyle s that will be used by
this SynthLookAndFeel . | |||||||||||
Sets the SynthStyleFactory that the UI classes provided by
synth will use to obtain a SynthStyle.
| |||||||||||
Returns whether or not the UIs should update their
SynthStyles from the SynthStyleFactory
when the ancestor of the JComponent changes. | |||||||||||
Called by UIManager when this look and feel is uninstalled.
| |||||||||||
Updates the style associated with
c , and all its children. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a SynthLookAndFeel.
For the returned SynthLookAndFeel
to be useful you need to
invoke load
to specify the set of
SynthStyle
s, or invoke setStyleFactory
.
Creates the Synth look and feel ComponentUI
for
the passed in JComponent
.
c | JComponent to create the ComponentUI for |
---|
c
Returns the defaults for this SynthLookAndFeel.
Returns a textual description of SynthLookAndFeel.
Return a string that identifies this look and feel.
Return a short string that identifies this look and feel.
Returns the Region for the JComponent c
.
c | JComponent to fetch the Region for |
---|
c
Gets a SynthStyle for the specified region of the specified component. This is not for general consumption, only custom UIs should call this method.
c | JComponent to get the SynthStyle for |
---|---|
region | Identifies the region of the specified component |
Returns the current SynthStyleFactory.
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.
Loads the set of SynthStyle
s that will be used by
this SynthLookAndFeel
. resourceBase
is
used to resolve any path based resources, for example an
Image
would be resolved by
resourceBase.getResource(path)
. Refer to
Synth File Format
for more information.
input | InputStream to load from |
---|---|
resourceBase | used to resolve any images or other resources |
ParseException | if there is an error in parsing |
---|---|
IllegalArgumentException | if input or resourceBase is null
|
Loads the set of SynthStyle
s that will be used by
this SynthLookAndFeel
. Path based resources are resolved
relatively to the specified URL
of the style. For example
an Image
would be resolved by
new URL(synthFile, path)
. Refer to
Synth File Format for more
information.
url | the URL to load the set of
SynthStyle from |
---|
ParseException | if there is an error in parsing |
---|---|
IllegalArgumentException | if synthSet is null |
IOException | if synthSet cannot be opened as an InputStream |
Sets the SynthStyleFactory that the UI classes provided by synth will use to obtain a SynthStyle.
cache | SynthStyleFactory the UIs should use. |
---|
Returns whether or not the UIs should update their
SynthStyles
from the SynthStyleFactory
when the ancestor of the JComponent
changes. A subclass
that provided a SynthStyleFactory
that based the
return value from getStyle
off the containment hierarchy
would override this method to return true.
SynthStyles
from the SynthStyleFactory
when the ancestor changed.
Called by UIManager when this look and feel is uninstalled.
Updates the style associated with c
, and all its children.
This is a lighter version of
SwingUtilities.updateComponentTreeUI
.
c | Component to update style for. |
---|