javax.swing.plaf.basic
Class BasicColorChooserUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ColorChooserUI
          extended by javax.swing.plaf.basic.BasicColorChooserUI

public class BasicColorChooserUI
extends ColorChooserUI

This is the UI Class for the JColorChooser in the Basic Look and Feel.


Nested Class Summary
 class BasicColorChooserUI.PropertyHandler
          This helper class handles property changes from the JColorChooser.
 
Field Summary
protected  JColorChooser chooser
          The JColorChooser this is installed on.
protected  AbstractColorChooserPanel[] defaultChoosers
          An array of default choosers to use in the JColorChooser.
protected  ChangeListener previewListener
          The listener for the preview panel.
protected  PropertyChangeListener propertyChangeListener
          The PropertyChangeListener for the JColorChooser.
 
Constructor Summary
BasicColorChooserUI()
          Creates a new BasicColorChooserUI object.
 
Method Summary
protected  AbstractColorChooserPanel[] createDefaultChoosers()
          This method creates the default chooser panels for the JColorChooser.
protected  PropertyChangeListener createPropertyChangeListener()
          This method creates the PropertyChangeListener used for listening to the JColorChooser.
static ComponentUI createUI(JComponent c)
          This method creates a new UI Component for the given JComponent.
protected  void installDefaults()
          This method installs the default properties given by the Basic Look and Feel.
protected  void installListeners()
          This method installs any listeners required for this UI to function.
protected  void installPreviewPanel()
          This method installs the preview panel for the JColorChooser.
 void installUI(JComponent c)
          This method installs the UI Component for the given JComponent.
protected  void uninstallDefaultChoosers()
          Uninstalls the default color choosers that have been installed by this UI.
protected  void uninstallDefaults()
          This method uninstalls the default properties given by the Basic Look and Feel.
protected  void uninstallListeners()
          This method uninstalls any listeners that were previously installed by the UI.
 void uninstallUI(JComponent c)
          This method uninstalls this UI for the given JComponent.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultChoosers

protected AbstractColorChooserPanel[] defaultChoosers
An array of default choosers to use in the JColorChooser.


previewListener

protected ChangeListener previewListener
The listener for the preview panel.


propertyChangeListener

protected PropertyChangeListener propertyChangeListener
The PropertyChangeListener for the JColorChooser.


chooser

protected JColorChooser chooser
The JColorChooser this is installed on.

Constructor Detail

BasicColorChooserUI

public BasicColorChooserUI()
Creates a new BasicColorChooserUI object.

Method Detail

createUI

public static ComponentUI createUI(JComponent c)
This method creates a new UI Component for the given JComponent.

Parameters:
c - The JComponent to create an UI for.
Returns:
A new BasicColorChooserUI.

createDefaultChoosers

protected AbstractColorChooserPanel[] createDefaultChoosers()
This method creates the default chooser panels for the JColorChooser.

Returns:
The default chooser panels.

installUI

public void installUI(JComponent c)
This method installs the UI Component for the given JComponent.

Overrides:
installUI in class ComponentUI
Parameters:
c - The JComponent to install this UI for.
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
This method uninstalls this UI for the given JComponent.

Overrides:
uninstallUI in class ComponentUI
Parameters:
c - The JComponent that will have this UI removed.
See Also:
ComponentUI.installUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallDefaultChoosers

protected void uninstallDefaultChoosers()
Uninstalls the default color choosers that have been installed by this UI.


installPreviewPanel

protected void installPreviewPanel()
This method installs the preview panel for the JColorChooser.


installDefaults

protected void installDefaults()
This method installs the default properties given by the Basic Look and Feel.


uninstallDefaults

protected void uninstallDefaults()
This method uninstalls the default properties given by the Basic Look and Feel.


installListeners

protected void installListeners()
This method installs any listeners required for this UI to function.


createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
This method creates the PropertyChangeListener used for listening to the JColorChooser.

Returns:
A PropertyChangeListener.

uninstallListeners

protected void uninstallListeners()
This method uninstalls any listeners that were previously installed by the UI.