| java.lang.Object | |
| ↳ | javax.swing.plaf.synth.SynthStyle |
Known Direct Subclasses
|
SynthStyle is a set of style properties.
Each SynthUI references at least one
SynthStyle that is obtained using a
SynthStyleFactory. You typically don't need to interact with
this class directly, rather you will load a
Synth File Format file into
SynthLookAndFeel that will create a set of SynthStyles.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a SynthStyle.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Getter for a region specific style property.
| |||||||||||
Convenience method to get a specific style property whose value is
an Boolean.
| |||||||||||
Returns the color for the specified state.
| |||||||||||
Returns the Font for the specified state.
| |||||||||||
Returns the
SynthGraphicUtils for the specified context. | |||||||||||
Convenience method to get a specific style property whose value is
an Icon.
| |||||||||||
Returns the Insets that are used to calculate sizing information.
| |||||||||||
Convenience method to get a specific style property whose value is
a
Number. | |||||||||||
Returns the
SynthPainter that will be used for painting. | |||||||||||
Convenience method to get a specific style property whose value is
a String.
| |||||||||||
Installs the necessary state from this Style on the
JComponent from context. | |||||||||||
Returns true if the region is opaque.
| |||||||||||
Uninstalls any state that this style installed on
the
JComponent from context. | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the color for the specified state.
| |||||||||||
Returns the font for the specified state.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Constructs a SynthStyle.
Getter for a region specific style property.
| context | SynthContext identifying requester |
|---|---|
| key | Property being requested. |
Convenience method to get a specific style property whose value is an Boolean.
| context | SynthContext identifying requester |
|---|---|
| key | Property being requested. |
| defaultValue | Value to return if the property has not been specified, or is not a Boolean |
Returns the color for the specified state. This gives precedence to
foreground and background of the JComponent. If the
Color from the JComponent is not appropriate,
or not used, this will invoke getColorForState. Subclasses
should generally not have to override this, instead override
getColorForState(SynthContext, ColorType).
| context | SynthContext identifying requester |
|---|---|
| type | Type of color being requested. |
Returns the Font for the specified state. This redirects to the
JComponent from the context as necessary.
If this does not redirect
to the JComponent getFontForState(SynthContext) is invoked.
| context | SynthContext identifying requester |
|---|
Returns the SynthGraphicUtils for the specified context.
| context | SynthContext identifying requester |
|---|
Convenience method to get a specific style property whose value is an Icon.
| context | SynthContext identifying requester |
|---|---|
| key | Property being requested. |
Returns the Insets that are used to calculate sizing information.
| context | SynthContext identifying requester |
|---|---|
| insets | Insets to place return value in. |
Convenience method to get a specific style property whose value is
a Number. If the value is a Number,
intValue is returned, otherwise defaultValue
is returned.
| context | SynthContext identifying requester |
|---|---|
| key | Property being requested. |
| defaultValue | Value to return if the property has not been specified, or is not a Number |
Returns the SynthPainter that will be used for painting.
This may return null.
| context | SynthContext identifying requester |
|---|
Convenience method to get a specific style property whose value is a String.
| context | SynthContext identifying requester |
|---|---|
| key | Property being requested. |
| defaultValue | Value to return if the property has not been specified, or is not a String |
Installs the necessary state from this Style on the
JComponent from context.
| context | SynthContext identifying component to install properties to. |
|---|
Returns true if the region is opaque.
| context | SynthContext identifying requester |
|---|
Uninstalls any state that this style installed on
the JComponent from context.
Styles should NOT depend upon this being called, in certain cases it may never be called.
| context | SynthContext identifying component to install properties to. |
|---|
Returns the color for the specified state. This should NOT call any
methods on the JComponent.
| context | SynthContext identifying requester |
|---|---|
| type | Type of color being requested. |
Returns the font for the specified state. This should NOT call any
method on the JComponent.
| context | SynthContext identifying requester |
|---|