Class Spinner

All Implemented Interfaces:
IRenderable, Tweenable, MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public class Spinner extends TextFieldComponent
  • Field Details

    • ARROW_DOWN

      public static final FontIcon ARROW_DOWN
    • ARROW_UP

      public static final FontIcon ARROW_UP
  • Constructor Details

    • Spinner

      public Spinner(double x, double y, double width, double height, double lowerBound, double upperBound, double startValue, double stepSize)
  • Method Details

    • decrement

      public void decrement()
    • getCurrentValue

      public BigDecimal getCurrentValue()
    • getLowerBound

      public BigDecimal getLowerBound()
    • getStepSize

      public BigDecimal getStepSize()
    • getUpperBound

      public BigDecimal getUpperBound()
    • increment

      public void increment()
    • onValueChange

      public void onValueChange(Consumer<BigDecimal> cons)
    • prepare

      public void prepare()
      Description copied from class: GuiComponent
      Prepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.). This is, for example, done right before switching to a new screen.
      Overrides:
      prepare in class GuiComponent
    • setCurrentValue

      public void setCurrentValue(BigDecimal newValue)
    • setLowerBound

      public void setLowerBound(BigDecimal lowerBound)
    • setStepSize

      public void setStepSize(BigDecimal stepSize)
    • setUpperBound

      public void setUpperBound(BigDecimal upperBound)