Class NumericUpDown


  • public class NumericUpDown
    extends GameObject
    Class that represents a numeric input field
    Author:
    Darius Dinger
    • Constructor Detail

      • NumericUpDown

        public NumericUpDown​(GUIPane parent,
                             String font)
        Creating new Numeric up down and setting ts parent or null, if no parent gui exist
        Parameters:
        parent - Parent gui or null
        font - Font of the numeric
    • Method Detail

      • onInit

        public void onInit()
        Description copied from class: GameObject
        This method gets called once in the GameObject life cycle. Even if the GameObject gets removed and readded, this method dont gets called again. Its like an additional constructor, except that its not gets called when the GameObject gets created, but when its first has to action.
        Overrides:
        onInit in class GameObject
      • getPane

        public GUIPane getPane()
        Returns:
        Frame pane component
      • getDownBt

        public Button getDownBt()
        Returns:
        Down button component
      • getUpBt

        public Button getUpBt()
        Returns:
        Up button component
      • getTextField

        public TextField getTextField()
        Returns:
        Textfield component
      • getValue

        public float getValue()
        Returns:
        Current value of the numeric
      • setValue

        public void setValue​(float value)
        Parameters:
        value - New value of the text field
      • setMax

        public void setMax​(float max)
        Parameters:
        max - New maximum value
      • setMin

        public void setMin​(float min)
        Parameters:
        min - New minimum value