public static class PersistableSwatchChooserPanel.ColorTracker extends org.jdesktop.beans.AbstractBean implements java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.awt.Color> |
colors
The list of recent
Colors . |
Constructor and Description |
---|
ColorTracker() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This method currently does nothing.
|
void |
addColor(java.awt.Color color)
Add a
Color to the list of recent color choices. |
java.util.List<java.awt.Color> |
getColors()
Get the recent color choices.
|
java.awt.Color |
getMostRecentColor()
Returns the user's last
Color selection. |
void |
setColors(java.util.List<java.awt.Color> colors)
Set the list of recent color choices.
|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
private java.util.List<java.awt.Color> colors
Colors
.public ColorTracker()
public void addColor(java.awt.Color color)
Color
to the list of recent color choices. This method
will fire off a "colors" property change.color
- Color
to be added.public void setColors(java.util.List<java.awt.Color> colors)
This method will fire off a "colors" property change.
colors
- List
of recent color choices. null
is allowed, but will result in colors
being empty.public java.util.List<java.awt.Color> getColors()
ArrayList
containing the recently picked colors.
May be empty.public java.awt.Color getMostRecentColor()
Color
selection.Color
that was selected, or
null
if no colors have been selected.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- Ignored.