Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.swing.colorchooser
Class DefaultColorSelectionModel

    java.lang.Object
      |
      +--javax.swing.colorchooser.DefaultColorSelectionModel

public class DefaultColorSelectionModel
extends java.lang.Object
implements ColorSelectionModel, java.io.Serializable

A generic implementation of ColorSelectionModel.

See Also:
  `Color`, Serialized Form

Field 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(java.awt.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.
`java.awt.Color` | `getSelectedColor()`
`void` | `removeChangeListener(ChangeListener l)` Removes a ChangeListener from the model.
`void` | `setSelectedColor(java.awt.Color color)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### changeEvent

    protected transient ChangeEvent changeEvent

  Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".

### listenerList

    protected EventListenerList listenerList

Constructor Detail

### DefaultColorSelectionModel

    public DefaultColorSelectionModel()

  Default constructor. Initializes selectedColor to Color.white

### DefaultColorSelectionModel

    public DefaultColorSelectionModel(java.awt.Color color)

  Initializes selectedColor to color

Method Detail

### getSelectedColor

    public java.awt.Color getSelectedColor()

  Specified by:
    getSelectedColor in interface ColorSelectionModel

### setSelectedColor

    public void setSelectedColor(java.awt.Color color)

  Specified by:
    setSelectedColor in interface ColorSelectionModel

### addChangeListener

    public void addChangeListener(ChangeListener l)

  Adds a ChangeListener to the model.
  Specified by:
    addChangeListener in interface ColorSelectionModel

### removeChangeListener

    public void removeChangeListener(ChangeListener l)

  Removes a ChangeListener from the model.
  Specified by:
    removeChangeListener in interface ColorSelectionModel

### fireStateChanged

    protected void fireStateChanged()

  Run each ChangeListeners stateChanged() method.
  See Also:
    `#setRangeProperties`, `EventListenerList`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.