public class IstiColorSelector
extends javax.swing.colorchooser.DefaultColorSelectionModel
| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.JButton |
button |
protected java.util.Vector |
listenerList |
| Constructor and Description |
|---|
IstiColorSelector(java.awt.Color c,
java.lang.String title)
Creates a color selector.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Adds an
ActionListener to the button. |
protected void |
fireActionPerformed(java.awt.event.ActionEvent event)
Notifies all listeners that have registered interest for
notification on this event type.
|
java.awt.Component |
getSelectionComponent()
Gets the selection component.
|
void |
removeActionListener(java.awt.event.ActionListener l)
Removes an
ActionListener from the button. |
void |
setSelectedColor(java.awt.Color color)
Sets the model's selected color to color.
|
protected final javax.swing.JButton button
protected java.util.Vector listenerList
public IstiColorSelector(java.awt.Color c,
java.lang.String title)
c - the initial color selection.title - title for the selector.public java.awt.Component getSelectionComponent()
public void setSelectedColor(java.awt.Color color)
setSelectedColor in interface javax.swing.colorchooser.ColorSelectionModelsetSelectedColor in class javax.swing.colorchooser.DefaultColorSelectionModelcolor - selected color.
Notifies any listeners if the model changesDefaultColorSelectionModel.getSelectedColor(),
DefaultColorSelectionModel.addChangeListener(javax.swing.event.ChangeListener)public void addActionListener(java.awt.event.ActionListener l)
ActionListener to the button.l - the ActionListener to be addedpublic void removeActionListener(java.awt.event.ActionListener l)
ActionListener from the button.
If the listener is the currently set Action
for the button, then the Action
is set to null.l - the listener to be removedprotected void fireActionPerformed(java.awt.event.ActionEvent event)
event - the ChangeEvent objectEventListenerList