FileDocCategorySizeDatePackage
ColorSelectionModel.javaAPI DocJava SE 5 API1598Fri Aug 26 14:58:00 BST 2005javax.swing.colorchooser

ColorSelectionModel

public interface ColorSelectionModel
A model that supports selecting a Color.
version
1.11 12/19/03
author
Steve Wilson
see
java.awt.Color

Fields Summary
Constructors Summary
Methods Summary
public voidaddChangeListener(javax.swing.event.ChangeListener listener)
Adds listener as a listener to changes in the model.

param
listener the ChangeListener to be added

public java.awt.ColorgetSelectedColor()
Returns the selected Color which should be non-null.

return
the selected Color
see
#setSelectedColor

public voidremoveChangeListener(javax.swing.event.ChangeListener listener)
Removes listener as a listener to changes in the model.

param
listener the ChangeListener to be removed

public voidsetSelectedColor(java.awt.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.

param
color the new Color
see
#getSelectedColor
see
#addChangeListener