javax.swing.plaf.basic
Class BasicLookAndFeel

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel 
      extended by javax.swing.plaf.basic.BasicLookAndFeel
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
MetalLookAndFeel sample code for javax.swing.plaf.metal.MetalLookAndFeel definition code for javax.swing.plaf.metal.MetalLookAndFeel , SynthLookAndFeel sample code for javax.swing.plaf.synth.SynthLookAndFeel definition code for javax.swing.plaf.synth.SynthLookAndFeel

public abstract class BasicLookAndFeel
extends LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

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 sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Constructor Summary
BasicLookAndFeel sample code for javax.swing.plaf.basic.BasicLookAndFeel.BasicLookAndFeel() definition code for javax.swing.plaf.basic.BasicLookAndFeel.BasicLookAndFeel() ()
           
 
Method Summary
protected  Action sample code for javax.swing.Action definition code for javax.swing.Action createAudioAction sample code for javax.swing.plaf.basic.BasicLookAndFeel.createAudioAction(java.lang.Object) definition code for javax.swing.plaf.basic.BasicLookAndFeel.createAudioAction(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          Returns an Action.
protected  ActionMap sample code for javax.swing.ActionMap definition code for javax.swing.ActionMap getAudioActionMap sample code for javax.swing.plaf.basic.BasicLookAndFeel.getAudioActionMap() definition code for javax.swing.plaf.basic.BasicLookAndFeel.getAudioActionMap() ()
          Returns an ActionMap.
 UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults getDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.getDefaults() definition code for javax.swing.plaf.basic.BasicLookAndFeel.getDefaults() ()
          This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table.
protected  void initClassDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.initClassDefaults(javax.swing.UIDefaults) definition code for javax.swing.plaf.basic.BasicLookAndFeel.initClassDefaults(javax.swing.UIDefaults) (UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table)
          Initialize the uiClassID to BasicComponentUI mapping.
protected  void initComponentDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(javax.swing.UIDefaults) definition code for javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(javax.swing.UIDefaults) (UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table)
           
 void initialize sample code for javax.swing.plaf.basic.BasicLookAndFeel.initialize() definition code for javax.swing.plaf.basic.BasicLookAndFeel.initialize() ()
          UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults().
protected  void initSystemColorDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.initSystemColorDefaults(javax.swing.UIDefaults) definition code for javax.swing.plaf.basic.BasicLookAndFeel.initSystemColorDefaults(javax.swing.UIDefaults) (UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table)
          Load the SystemColors into the defaults table.
protected  void loadSystemColors sample code for javax.swing.plaf.basic.BasicLookAndFeel.loadSystemColors(javax.swing.UIDefaults, java.lang.String[], boolean) definition code for javax.swing.plaf.basic.BasicLookAndFeel.loadSystemColors(javax.swing.UIDefaults, java.lang.String[], boolean) (UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table, String sample code for java.lang.String definition code for java.lang.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 sample code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action) definition code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action) (Action sample code for javax.swing.Action definition code for javax.swing.Action  audioAction)
          Decides whether to fire the Action that is passed into it and, if needed, fires the Action's actionPerformed method.
 void uninitialize sample code for javax.swing.plaf.basic.BasicLookAndFeel.uninitialize() definition code for javax.swing.plaf.basic.BasicLookAndFeel.uninitialize() ()
          UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel.
 
Methods inherited from class javax.swing.LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel
getDescription sample code for javax.swing.LookAndFeel.getDescription() definition code for javax.swing.LookAndFeel.getDescription() , getDesktopPropertyValue sample code for javax.swing.LookAndFeel.getDesktopPropertyValue(java.lang.String, java.lang.Object) definition code for javax.swing.LookAndFeel.getDesktopPropertyValue(java.lang.String, java.lang.Object) , getDisabledIcon sample code for javax.swing.LookAndFeel.getDisabledIcon(javax.swing.JComponent, javax.swing.Icon) definition code for javax.swing.LookAndFeel.getDisabledIcon(javax.swing.JComponent, javax.swing.Icon) , getDisabledSelectedIcon sample code for javax.swing.LookAndFeel.getDisabledSelectedIcon(javax.swing.JComponent, javax.swing.Icon) definition code for javax.swing.LookAndFeel.getDisabledSelectedIcon(javax.swing.JComponent, javax.swing.Icon) , getID sample code for javax.swing.LookAndFeel.getID() definition code for javax.swing.LookAndFeel.getID() , getName sample code for javax.swing.LookAndFeel.getName() definition code for javax.swing.LookAndFeel.getName() , getSupportsWindowDecorations sample code for javax.swing.LookAndFeel.getSupportsWindowDecorations() definition code for javax.swing.LookAndFeel.getSupportsWindowDecorations() , installBorder sample code for javax.swing.LookAndFeel.installBorder(javax.swing.JComponent, java.lang.String) definition code for javax.swing.LookAndFeel.installBorder(javax.swing.JComponent, java.lang.String) , installColors sample code for javax.swing.LookAndFeel.installColors(javax.swing.JComponent, java.lang.String, java.lang.String) definition code for javax.swing.LookAndFeel.installColors(javax.swing.JComponent, java.lang.String, java.lang.String) , installColorsAndFont sample code for javax.swing.LookAndFeel.installColorsAndFont(javax.swing.JComponent, java.lang.String, java.lang.String, java.lang.String) definition code for javax.swing.LookAndFeel.installColorsAndFont(javax.swing.JComponent, java.lang.String, java.lang.String, java.lang.String) , installProperty sample code for javax.swing.LookAndFeel.installProperty(javax.swing.JComponent, java.lang.String, java.lang.Object) definition code for javax.swing.LookAndFeel.installProperty(javax.swing.JComponent, java.lang.String, java.lang.Object) , isNativeLookAndFeel sample code for javax.swing.LookAndFeel.isNativeLookAndFeel() definition code for javax.swing.LookAndFeel.isNativeLookAndFeel() , isSupportedLookAndFeel sample code for javax.swing.LookAndFeel.isSupportedLookAndFeel() definition code for javax.swing.LookAndFeel.isSupportedLookAndFeel() , loadKeyBindings sample code for javax.swing.LookAndFeel.loadKeyBindings(javax.swing.InputMap, java.lang.Object[]) definition code for javax.swing.LookAndFeel.loadKeyBindings(javax.swing.InputMap, java.lang.Object[]) , makeComponentInputMap sample code for javax.swing.LookAndFeel.makeComponentInputMap(javax.swing.JComponent, java.lang.Object[]) definition code for javax.swing.LookAndFeel.makeComponentInputMap(javax.swing.JComponent, java.lang.Object[]) , makeIcon sample code for javax.swing.LookAndFeel.makeIcon(java.lang.Class, java.lang.String) definition code for javax.swing.LookAndFeel.makeIcon(java.lang.Class, java.lang.String) , makeInputMap sample code for javax.swing.LookAndFeel.makeInputMap(java.lang.Object[]) definition code for javax.swing.LookAndFeel.makeInputMap(java.lang.Object[]) , makeKeyBindings sample code for javax.swing.LookAndFeel.makeKeyBindings(java.lang.Object[]) definition code for javax.swing.LookAndFeel.makeKeyBindings(java.lang.Object[]) , provideErrorFeedback sample code for javax.swing.LookAndFeel.provideErrorFeedback(java.awt.Component) definition code for javax.swing.LookAndFeel.provideErrorFeedback(java.awt.Component) , toString sample code for javax.swing.LookAndFeel.toString() definition code for javax.swing.LookAndFeel.toString() , uninstallBorder sample code for javax.swing.LookAndFeel.uninstallBorder(javax.swing.JComponent) definition code for javax.swing.LookAndFeel.uninstallBorder(javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BasicLookAndFeel sample code for javax.swing.plaf.basic.BasicLookAndFeel() definition code for javax.swing.plaf.basic.BasicLookAndFeel()

public BasicLookAndFeel()
Method Detail

getDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.getDefaults() definition code for javax.swing.plaf.basic.BasicLookAndFeel.getDefaults()

public UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  getDefaults()
Description copied from class: LookAndFeel sample code for javax.swing.LookAndFeel.getDefaults() definition code for javax.swing.LookAndFeel.getDefaults()
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. Other applications, for example an application builder, may also call this method.

Overrides:
getDefaults sample code for javax.swing.LookAndFeel.getDefaults() definition code for javax.swing.LookAndFeel.getDefaults() in class LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel
See Also:
LookAndFeel.initialize() sample code for javax.swing.LookAndFeel.initialize() definition code for javax.swing.LookAndFeel.initialize() , LookAndFeel.uninitialize() sample code for javax.swing.LookAndFeel.uninitialize() definition code for javax.swing.LookAndFeel.uninitialize() , UIManager.setLookAndFeel(javax.swing.LookAndFeel) sample code for javax.swing.UIManager.setLookAndFeel(javax.swing.LookAndFeel) definition code for javax.swing.UIManager.setLookAndFeel(javax.swing.LookAndFeel)

initialize sample code for javax.swing.plaf.basic.BasicLookAndFeel.initialize() definition code for javax.swing.plaf.basic.BasicLookAndFeel.initialize()

public void initialize()
UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults().

Overrides:
initialize sample code for javax.swing.LookAndFeel.initialize() definition code for javax.swing.LookAndFeel.initialize() in class LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel
See Also:
LookAndFeel.uninitialize() sample code for javax.swing.LookAndFeel.uninitialize() definition code for javax.swing.LookAndFeel.uninitialize() , UIManager.setLookAndFeel(javax.swing.LookAndFeel) sample code for javax.swing.UIManager.setLookAndFeel(javax.swing.LookAndFeel) definition code for javax.swing.UIManager.setLookAndFeel(javax.swing.LookAndFeel)

uninitialize sample code for javax.swing.plaf.basic.BasicLookAndFeel.uninitialize() definition code for javax.swing.plaf.basic.BasicLookAndFeel.uninitialize()

public void uninitialize()
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel.

Overrides:
uninitialize sample code for javax.swing.LookAndFeel.uninitialize() definition code for javax.swing.LookAndFeel.uninitialize() in class LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel
See Also:
LookAndFeel.initialize() sample code for javax.swing.LookAndFeel.initialize() definition code for javax.swing.LookAndFeel.initialize()

initClassDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.initClassDefaults(javax.swing.UIDefaults) definition code for javax.swing.plaf.basic.BasicLookAndFeel.initClassDefaults(javax.swing.UIDefaults)

protected void initClassDefaults(UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table)
Initialize the uiClassID to BasicComponentUI mapping. The JComponent classes define their own uiClassID constants (see AbstractComponent.getUIClassID). This table must map those constants to a BasicComponentUI class of the appropriate type.

See Also:
getDefaults() sample code for javax.swing.plaf.basic.BasicLookAndFeel.getDefaults() definition code for javax.swing.plaf.basic.BasicLookAndFeel.getDefaults()

initSystemColorDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.initSystemColorDefaults(javax.swing.UIDefaults) definition code for javax.swing.plaf.basic.BasicLookAndFeel.initSystemColorDefaults(javax.swing.UIDefaults)

protected void initSystemColorDefaults(UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table)
Load the SystemColors into the defaults table. The keys for SystemColor defaults are the same as the names of the public fields in SystemColor. If the table is being created on a native Windows platform we use the SystemColor values, otherwise we create color objects whose values match the defaults Windows95 colors.


loadSystemColors sample code for javax.swing.plaf.basic.BasicLookAndFeel.loadSystemColors(javax.swing.UIDefaults, java.lang.String[], boolean) definition code for javax.swing.plaf.basic.BasicLookAndFeel.loadSystemColors(javax.swing.UIDefaults, java.lang.String[], boolean)

protected void loadSystemColors(UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table,
                                String sample code for java.lang.String definition code for java.lang.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. If not we use the integer color values in the systemColors argument.


initComponentDefaults sample code for javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(javax.swing.UIDefaults) definition code for javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(javax.swing.UIDefaults)

protected void initComponentDefaults(UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults  table)

getAudioActionMap sample code for javax.swing.plaf.basic.BasicLookAndFeel.getAudioActionMap() definition code for javax.swing.plaf.basic.BasicLookAndFeel.getAudioActionMap()

protected ActionMap sample code for javax.swing.ActionMap definition code for javax.swing.ActionMap  getAudioActionMap()
Returns an 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.

Returns:
an ActionMap containing Actions responsible for rendering auditory cues
Since:
1.4
See Also:
createAudioAction(java.lang.Object) sample code for javax.swing.plaf.basic.BasicLookAndFeel.createAudioAction(java.lang.Object) definition code for javax.swing.plaf.basic.BasicLookAndFeel.createAudioAction(java.lang.Object) , playSound(Action) sample code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action) definition code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action)

createAudioAction sample code for javax.swing.plaf.basic.BasicLookAndFeel.createAudioAction(java.lang.Object) definition code for javax.swing.plaf.basic.BasicLookAndFeel.createAudioAction(java.lang.Object)

protected Action sample code for javax.swing.Action definition code for javax.swing.Action  createAudioAction(Object sample code for java.lang.Object definition code for java.lang.Object  key)
Returns an 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.

Returns:
an Action which knows how to render the auditory cue for one particular system or user activity
Since:
1.4
See Also:
playSound(Action) sample code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action) definition code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action)

playSound sample code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action) definition code for javax.swing.plaf.basic.BasicLookAndFeel.playSound(javax.swing.Action)

protected void playSound(Action sample code for javax.swing.Action definition code for javax.swing.Action  audioAction)
Decides whether to fire the 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".

Parameters:
audioAction - an Action that knows how to render the audio associated with the system or user activity that is occurring
Since:
1.4