Package edu.wisc.ssec.mcidasv.ui
Class PersistableSwatchChooserPanel.ColorTracker
java.lang.Object
org.jdesktop.beans.AbstractBean
edu.wisc.ssec.mcidasv.ui.PersistableSwatchChooserPanel.ColorTracker
- All Implemented Interfaces:
ActionListener
,EventListener
- Enclosing class:
PersistableSwatchChooserPanel
public static class PersistableSwatchChooserPanel.ColorTracker
extends org.jdesktop.beans.AbstractBean
implements ActionListener
This class is used to save and restore the recent color choices..
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
colors
The list of recentColors
.
-
-
Constructor Details
-
ColorTracker
public ColorTracker()
-
-
Method Details
-
addColor
Add aColor
to the list of recent color choices. This method will fire off a "colors" property change.- Parameters:
color
-Color
to be added.
-
setColors
Set the list of recent color choices. This method is what should be called when "restoring" the recent colors panel.This method will fire off a "colors" property change.
- Parameters:
colors
-List
of recent color choices.null
is allowed, but will result incolors
being empty.
-
getColors
Get the recent color choices.- Returns:
ArrayList
containing the recently picked colors. May be empty.
-
getMostRecentColor
Returns the user's lastColor
selection.- Returns:
- Either the last
Color
that was selected, ornull
if no colors have been selected.
-
actionPerformed
This method currently does nothing.- Specified by:
actionPerformed
in interfaceActionListener
- Parameters:
e
- Ignored.
-