public abstract class BasicLookAndFeel extends LookAndFeel implements Serializable
Constructor and Description |
---|
BasicLookAndFeel()
Creates a new instance of the Basic look and feel.
|
Modifier and Type | Method and Description |
---|---|
protected Action |
createAudioAction(Object key)
Creates an
Action that can play an auditory cue specified by
the key. |
protected ActionMap |
getAudioActionMap()
Returns the
ActionMap that stores all the actions that are
responsibly for rendering auditory cues. |
UIDefaults |
getDefaults()
Creates and returns a new instance of the default resources for this look
and feel.
|
protected void |
initClassDefaults(UIDefaults defaults)
Populates the
defaults table with mappings between class IDs
and fully qualified class names for the UI delegates. |
protected void |
initComponentDefaults(UIDefaults defaults)
Populates the
defaults table with UI default values for
colors, fonts, keybindings and much more. |
void |
initialize()
Initializes the Look and Feel.
|
protected void |
initSystemColorDefaults(UIDefaults defaults)
Populates the
defaults table with system color defaults. |
protected void |
loadSystemColors(UIDefaults defaults,
String[] systemColors,
boolean useNative)
Populates the
defaults table with the system colors. |
protected void |
playSound(Action audioAction)
Plays the sound of the action if it is listed in
AuditoryCues.playList . |
void |
uninitialize()
Uninitializes the Look and Feel.
|
getDescription, getDesktopPropertyValue, getID, getName, getSupportsWindowDecorations, installBorder, installColors, installColorsAndFont, installProperty, isNativeLookAndFeel, isSupportedLookAndFeel, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder
public BasicLookAndFeel()
public UIDefaults getDefaults()
getDefaults
in class LookAndFeel
protected void initClassDefaults(UIDefaults defaults)
defaults
table with mappings between class IDs
and fully qualified class names for the UI delegates.defaults
- the defaults table (null
not permitted).protected void initSystemColorDefaults(UIDefaults defaults)
defaults
table with system color defaults.
This sets up a couple of default values and passes them to
loadSystemColors(UIDefaults, String[], boolean)
. If the
look and feel is a native look and feel, these defaults may be overridden
by the corresponding SystemColor constants.defaults
- the defaults table (null
not permitted).protected void loadSystemColors(UIDefaults defaults, String[] systemColors, boolean useNative)
defaults
table with the system colors. If
useNative
is true
, the table is populated
with the constants in SystemColor
, otherwise the
systemColors
parameter is decoded into the defaults table.
The system colors array is made up of pairs, where the first entry is the
name of the system color, and the second entry is a string denoting
an RGB color value like "#C0C0C0", which is decoded using
Color.decode(String)
.defaults
- the defaults table (null
not permitted).systemColors
- defaults to use when useNative
is
false
useNative
- when true
, installs the values of the
SystemColor constants, when false
, install the values
from systemColors
protected void initComponentDefaults(UIDefaults defaults)
defaults
table with UI default values for
colors, fonts, keybindings and much more.defaults
- the defaults table (null
not permitted).protected ActionMap getAudioActionMap()
ActionMap
that stores all the actions that are
responsibly for rendering auditory cues.createAudioAction(java.lang.Object)
,
playSound(javax.swing.Action)
protected Action createAudioAction(Object key)
Action
that can play an auditory cue specified by
the key. The UIDefaults value for the key is normally a String that points
to an audio file relative to the current package.key
- a UIDefaults key that specifies the soundplaySound(javax.swing.Action)
protected void playSound(Action audioAction)
AuditoryCues.playList
.audioAction
- the audio action to playpublic void initialize()
initialize
in class LookAndFeel
public void uninitialize()
uninitialize
in class LookAndFeel