Class ValueDigit

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

public class ValueDigit extends Digit
Descendant of Digit displaying a integer value digit.
Version:
$id$
Author:
Jernej Kamenik
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setValue

      public void setValue(int newValue) throws IllegalArgumentException
      Sets the value displayed.
      Parameters:
      newValue - INCREASE_VALUE increases the value, DECREASE_VALUE decreases the value, else the number newValue is set.
      Throws:
      IllegalArgumentException
    • getValue

      public int getValue()
      Gets the value displayed.
      Returns:
      int
    • paintDigitTransition

      protected void paintDigitTransition(BufferedImage oldImage, BufferedImage newImage, Graphics g, float parameter)
      This method was overriden to implement animated number digit scrolling.
      Overrides:
      paintDigitTransition in class Digit
      g - Graphics object on which to paint the two images.
      parameter - float value between 0 and 1.f.