|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.colorchooser.DefaultColorSelectionModel
A generic implementation of ColorSelectionModel.
Color
, Serialized FormField Summary | |
protected ChangeEvent |
changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. |
protected EventListenerList |
listenerList
|
Constructor Summary | |
DefaultColorSelectionModel()
Default constructor. |
|
DefaultColorSelectionModel(Color color)
Initializes selectedColor to color |
Method Summary | |
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the model. |
protected void |
fireStateChanged()
Run each ChangeListeners stateChanged() method. |
Color |
getSelectedColor()
|
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the model. |
void |
setSelectedColor(Color color)
Sets the model's selected color to color. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient ChangeEvent changeEvent
protected EventListenerList listenerList
Constructor Detail |
public DefaultColorSelectionModel()
public DefaultColorSelectionModel(Color color)
Method Detail |
public Color getSelectedColor()
getSelectedColor
in interface ColorSelectionModel
javax.swing.colorchooser.ColorSelectionModel
ColorSelectionModel.setSelectedColor(java.awt.Color)
public void setSelectedColor(Color color)
ColorSelectionModel
setSelectedColor
in interface ColorSelectionModel
javax.swing.colorchooser.ColorSelectionModel
ColorSelectionModel.getSelectedColor()
,
ColorSelectionModel.addChangeListener(javax.swing.event.ChangeListener)
public void addChangeListener(ChangeListener l)
addChangeListener
in interface ColorSelectionModel
public void removeChangeListener(ChangeListener l)
removeChangeListener
in interface ColorSelectionModel
protected void fireStateChanged()
EventListenerList
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.