javax.swing.plaf.basic

Class BasicColorChooserUI

public class BasicColorChooserUI extends ColorChooserUI

This is the UI Class for the JColorChooser in the Basic Look and Feel.
Nested Class Summary
classBasicColorChooserUI.PropertyHandler
This helper class handles property changes from the JColorChooser.
Field Summary
protected JColorChooserchooser
The JColorChooser this is installed on.
protected AbstractColorChooserPanel[]defaultChoosers
An array of default choosers to use in the JColorChooser.
protected ChangeListenerpreviewListener
The listener for the preview panel.
protected PropertyChangeListenerpropertyChangeListener
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 PropertyChangeListenercreatePropertyChangeListener()
This method creates the PropertyChangeListener used for listening to the JColorChooser.
static ComponentUIcreateUI(JComponent c)
This method creates a new UI Component for the given JComponent.
protected voidinstallDefaults()
This method installs the default properties given by the Basic Look and Feel.
protected voidinstallListeners()
This method installs any listeners required for this UI to function.
protected voidinstallPreviewPanel()
This method installs the preview panel for the JColorChooser.
voidinstallUI(JComponent c)
This method installs the UI Component for the given JComponent.
protected voiduninstallDefaultChoosers()
Uninstalls the default color choosers that have been installed by this UI.
protected voiduninstallDefaults()
This method uninstalls the default properties given by the Basic Look and Feel.
protected voiduninstallListeners()
This method uninstalls any listeners that were previously installed by the UI.
voiduninstallUI(JComponent c)
This method uninstalls this UI for the given JComponent.

Field Detail

chooser

protected JColorChooser chooser
The JColorChooser this is installed on.

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.

Constructor Detail

BasicColorChooserUI

public BasicColorChooserUI()
Creates a new BasicColorChooserUI object.

Method Detail

createDefaultChoosers

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

Returns: The default chooser panels.

createPropertyChangeListener

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

Returns: A PropertyChangeListener.

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.

installDefaults

protected void installDefaults()
This method installs 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.

installPreviewPanel

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

installUI

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

Parameters: c The JComponent to install this UI for.

uninstallDefaultChoosers

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

uninstallDefaults

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

uninstallListeners

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

uninstallUI

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

Parameters: c The JComponent that will have this UI removed.