Class Cycler

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class Cycler extends Container
A component which allows a user to move through a range of values by clicking on up/down triangular buttons. This class simply reports a desire to increase/decrease a particular value; this class does not track a value nor does it enfore a maximum/minimum value.
Author:
Kapono Carter
See Also:
  • Constructor Details

    • Cycler

      public Cycler()
      Creates a new Cycler instance
  • Method Details

    • addCyclerListener

      public void addCyclerListener(CyclerListener l)
      Adds a listener to be notified when the scale is pressed
      Parameters:
      l - the listener to be added
    • removeCyclerListener

      public void removeCyclerListener(CyclerListener l)
      Removes a listener from the list of those notified when the scale is pressed
      Parameters:
      l - the listener to be removed
    • processCyclerEvent

      protected void processCyclerEvent(CyclerEvent e)
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class Container
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class Container
    • main

      public static void main(String[] argv)