|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.colorchooser.DefaultColorSelectionModel com.isti.util.gui.IstiColorSelector
public class IstiColorSelector
Defines the color selector.
Field Summary | |
---|---|
protected javax.swing.JButton |
button
|
protected java.util.Vector |
listenerList
|
Fields inherited from class javax.swing.colorchooser.DefaultColorSelectionModel |
---|
changeEvent |
Constructor Summary | |
---|---|
IstiColorSelector(java.awt.Color c,
java.lang.String title)
Creates a color selector. |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.swing.colorchooser.DefaultColorSelectionModel |
---|
addChangeListener, fireStateChanged, getChangeListeners, getSelectedColor, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final javax.swing.JButton button
protected java.util.Vector listenerList
Constructor Detail |
---|
public IstiColorSelector(java.awt.Color c, java.lang.String title)
c
- the initial color selection.title
- title for the selector.Method Detail |
---|
public java.awt.Component getSelectionComponent()
public void setSelectedColor(java.awt.Color color)
setSelectedColor
in interface javax.swing.colorchooser.ColorSelectionModel
setSelectedColor
in class javax.swing.colorchooser.DefaultColorSelectionModel
color
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |