Class DirectionButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class DirectionButton extends JButton
A button containing a directional arrow icon (north/south/east/west). This control differs slightly from a standard button in that holding the button down causes a series of ActionEvents to be generated at regular intervals (200ms by default).
Author:
Kapono Carter
See Also:
  • Constructor Details

  • Method Details

    • setInterval

      public void setInterval(int val)
      Modifies the interval at which ActionEvents are generated when the control is selected and held down.
      Parameters:
      val - the new timer interval
    • getInterval

      public int getInterval()
      Retrieves the interval at which ActionEvents are generated when the control is selected and held down.
      Returns:
      the current timer interval