|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.LookAndFeel javax.swing.plaf.basic.BasicLookAndFeel
public abstract class BasicLookAndFeel
Implements the a standard base LookAndFeel class from which standard desktop LookAndFeel classes (JLF, Mac, Windows, etc.) can be derived. This class cannot be instantiated directly, however the UI classes "Basic" defines can be.
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. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans
package.
Please see XMLEncoder
.
Constructor Summary | |
---|---|
BasicLookAndFeel()
|
Method Summary | |
---|---|
protected Action |
createAudioAction(Object key)
Returns an Action . |
protected ActionMap |
getAudioActionMap()
Returns an ActionMap . |
UIDefaults |
getDefaults()
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. |
protected void |
initClassDefaults(UIDefaults table)
Initialize the uiClassID to BasicComponentUI mapping. |
protected void |
initComponentDefaults(UIDefaults table)
|
void |
initialize()
UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults(). |
protected void |
initSystemColorDefaults(UIDefaults table)
Load the SystemColors into the defaults table. |
protected void |
loadSystemColors(UIDefaults table,
String[] systemColors,
boolean useNative)
If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants. |
protected void |
playSound(Action audioAction)
Decides whether to fire the Action that is passed into
it and, if needed, fires the Action 's
actionPerformed method. |
void |
uninitialize()
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicLookAndFeel()
Method Detail |
---|
public UIDefaults getDefaults()
LookAndFeel
getDefaults
in class LookAndFeel
LookAndFeel.initialize()
,
LookAndFeel.uninitialize()
,
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public void initialize()
initialize
in class LookAndFeel
LookAndFeel.uninitialize()
,
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public void uninitialize()
uninitialize
in class LookAndFeel
LookAndFeel.initialize()
protected void initClassDefaults(UIDefaults table)
getDefaults()
protected void initSystemColorDefaults(UIDefaults table)
protected void loadSystemColors(UIDefaults table, String[] systemColors, boolean useNative)
systemColors
argument.
protected void initComponentDefaults(UIDefaults table)
protected ActionMap getAudioActionMap()
ActionMap
.
This ActionMap
contains Actions
that
embody the ability to render an auditory cue. These auditory
cues map onto user and system activities that may be useful
for an end user to know about (such as a dialog box appearing).
At the appropriate time in a JComponent
UI's lifecycle,
the ComponentUI is responsible for getting the appropriate
Action
out of the ActionMap
and passing
it on to playSound
.
The Actions
in this ActionMap
are
created by the createAudioAction
method.
createAudioAction(java.lang.Object)
,
playSound(Action)
protected Action createAudioAction(Object key)
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 an audio file relative to the current package.
This Action
's actionPerformed
method
is fired by the playSound
method.
playSound(Action)
protected void playSound(Action audioAction)
Action
that is passed into
it and, if needed, fires the Action
's
actionPerformed
method. This has the effect
of rendering the audio appropriate for the situation.
The set of possible cues to be played are stored in the default table value "AuditoryCues.cueList". The cues that will be played are stored in "AuditoryCues.playList".
audioAction
- an Action that knows how to render the audio
associated with the system or user activity
that is occurring
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.