Class NumberAdjuster

All Implemented Interfaces:
IRenderable, Tweenable, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class NumberAdjuster
extends TextFieldComponent
  • Field Details

  • Constructor Details

    • NumberAdjuster

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

    • decrement

      public void decrement()
    • getCurrentValue

      public java.math.BigDecimal getCurrentValue()
    • getLowerBound

      public java.math.BigDecimal getLowerBound()
    • getStepSize

      public java.math.BigDecimal getStepSize()
    • getUpperBound

      public java.math.BigDecimal getUpperBound()
    • increment

      public void increment()
    • onValueChange

      public void onValueChange​(java.util.function.Consumer<java.math.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.
      prepare in class GuiComponent
    • setCurrentValue

      public void setCurrentValue​(java.math.BigDecimal newValue)
    • setLowerBound

      public void setLowerBound​(java.math.BigDecimal lowerBound)
    • setStepSize

      public void setStepSize​(java.math.BigDecimal stepSize)
    • setUpperBound

      public void setUpperBound​(java.math.BigDecimal upperBound)