Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.plaf.basic
Class BasicColorChooserUI  view BasicColorChooserUI download BasicColorChooserUI.java

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended byjavax.swing.plaf.ColorChooserUI
          extended byjavax.swing.plaf.basic.BasicColorChooserUI

public class BasicColorChooserUI
extends javax.swing.plaf.ColorChooserUI

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


Nested Class Summary
private  class BasicColorChooserUI.PreviewListener
          This is a helper class that listens to the Model of the JColorChooser for color change events so it can update the preview panel.
 class BasicColorChooserUI.PropertyHandler
          This helper class handles property changes from the JColorChooser.
private  class BasicColorChooserUI.TabPaneListener
          This helper class listens to the JTabbedPane that is used for tab changes.
 
Field Summary
protected  javax.swing.JColorChooser chooser
          The JColorChooser this is installed on.
protected  javax.swing.colorchooser.AbstractColorChooserPanel[] defaultChoosers
          An array of default choosers to use in the JColorChooser.
(package private)  javax.swing.JTabbedPane pane
          The JTabbedPane that is used.
private  java.awt.Container prevContainer
          The Container that holds the preview panel.
protected  javax.swing.event.ChangeListener previewListener
          The listener for the preview panel.
protected  java.beans.PropertyChangeListener propertyChangeListener
          The PropertyChangeListener for the JColorChooser.
 
Constructor Summary
BasicColorChooserUI()
          Creates a new BasicColorChooserUI object.
 
Method Summary
protected  javax.swing.colorchooser.AbstractColorChooserPanel[] createDefaultChoosers()
          This method creates the default chooser panels for the JColorChooser.
protected  java.beans.PropertyChangeListener createPropertyChangeListener()
          This method creates the PropertyChangeListener used for listening to the JColorChooser.
static javax.swing.plaf.ComponentUI createUI(javax.swing.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(javax.swing.JComponent c)
          This method installs the UI Component for the given JComponent.
(package private)  void makeTabs(javax.swing.colorchooser.AbstractColorChooserPanel[] panels)
          This method adds tabs to the JTabbedPane for the chooserPanels defined in the JColorChooser.
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(javax.swing.JComponent c)
          This method uninstalls this UI for the given JComponent.
(package private)  void updatePreviewPanel(javax.swing.JComponent preview)
          This is a helper method that swaps the existing preview panel with the given panel.
 
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 javax.swing.colorchooser.AbstractColorChooserPanel[] defaultChoosers
An array of default choosers to use in the JColorChooser.


previewListener

protected javax.swing.event.ChangeListener previewListener
The listener for the preview panel.


propertyChangeListener

protected java.beans.PropertyChangeListener propertyChangeListener
The PropertyChangeListener for the JColorChooser.


chooser

protected javax.swing.JColorChooser chooser
The JColorChooser this is installed on.


pane

javax.swing.JTabbedPane pane
The JTabbedPane that is used.


prevContainer

private java.awt.Container prevContainer
The Container that holds the preview panel.

Constructor Detail

BasicColorChooserUI

public BasicColorChooserUI()
Creates a new BasicColorChooserUI object.

Method Detail

createUI

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


createDefaultChoosers

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


installUI

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


makeTabs

void makeTabs(javax.swing.colorchooser.AbstractColorChooserPanel[] panels)
This method adds tabs to the JTabbedPane for the chooserPanels defined in the JColorChooser. This is package-private to avoid an accessor method.


uninstallUI

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


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.


updatePreviewPanel

void updatePreviewPanel(javax.swing.JComponent preview)
This is a helper method that swaps the existing preview panel with the given panel. This is package-private to avoid an accessor method.


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 java.beans.PropertyChangeListener createPropertyChangeListener()
This method creates the PropertyChangeListener used for listening to the JColorChooser.


uninstallListeners

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