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

    Fields
    Modifier and Type
    Field
    Description
    private List<Color>
    The list of recent Colors.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method currently does nothing.
    void
    addColor(Color color)
    Add a Color to the list of recent color choices.
    Get the recent color choices.
    Returns the user's last Color selection.
    void
    setColors(List<Color> colors)
    Set the list of recent color choices.

    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

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • addColor

      public void addColor(Color color)
      Add a Color to the list of recent color choices. This method will fire off a "colors" property change.
      Parameters:
      color - Color to be added.
    • setColors

      public void setColors(List<Color> colors)
      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 in colors being empty.
    • getColors

      public List<Color> getColors()
      Get the recent color choices.
      Returns:
      ArrayList containing the recently picked colors. May be empty.
    • getMostRecentColor

      Returns the user's last Color selection.
      Returns:
      Either the last Color that was selected, or null if no colors have been selected.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      This method currently does nothing.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      e - Ignored.