This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.colorchooser
interface ColorSelectionModel

All Known Implementing Classes:
DefaultColorSelectionModel

Most common way to construct:

JColorChooser colorChooser = …;

ColorSelectionModel model = colorChooser.getSelectionModel();

Based on 21 examples


public interface ColorSelectionModel

A model that supports selecting a Color.


Method Summary
 void

          Adds listener as a listener to changes in the model.
 Color

          Returns the selected Color which should be non-null.
 void

          Removes listener as a listener to changes in the model.
 void

          Sets the selected color to color.
 

Method Detail

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds listener as a listener to changes in the model.

Parameters:
listener - the ChangeListener to be added

getSelectedColor

public Color getSelectedColor()
Returns the selected Color which should be non-null.

Returns:
the selected Color

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes listener as a listener to changes in the model.

Parameters:
listener - the ChangeListener to be removed

setSelectedColor

public void setSelectedColor(Color color)
Sets the selected color to color. Note that setting the color to null is undefined and may have unpredictable results. This method fires a state changed event if it sets the current color to a new non-null color.

Parameters:
color - the new Color


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.