Class UIIntegerBox

All Implemented Interfaces:
UIContextActions, UIControlTarget, UIFocus, UIKeyFocus, UIModulationTarget, UIMouseFocus, UITabFocus, LXLoopTask
Direct Known Subclasses:
UIEnumBox

public class UIIntegerBox extends UINumberBox implements UIControlTarget, UIModulationTarget
  • Field Details

  • Constructor Details

    • UIIntegerBox

      public UIIntegerBox()
    • UIIntegerBox

      public UIIntegerBox(float x, float y, float w, float h)
    • UIIntegerBox

      public UIIntegerBox(float w, DiscreteParameter parameter)
    • UIIntegerBox

      public UIIntegerBox(float w, float h, DiscreteParameter parameter)
    • UIIntegerBox

      public UIIntegerBox(float x, float y, float w, float h, DiscreteParameter parameter)
  • Method Details

    • getDescription

      public String getDescription()
      Description copied from class: UIObject
      Objects are encouraged to override this method providing a helpful String displayed to the user explaining the function of this UI component. If no help is available, return null rather than an empty String.
      Overrides:
      getDescription in class UIObject
      Returns:
      Helpful contextual string explaining function of this element
    • getParameter

      public DiscreteParameter getParameter()
      Specified by:
      getParameter in class UIParameterComponent
    • setParameter

      public UIIntegerBox setParameter(DiscreteParameter parameter)
    • setWrappable

      public UIIntegerBox setWrappable(boolean wrappable)
      Sets whether the box is wrappable, only applies when there is not a parameter set.
      Parameters:
      wrappable - Whether box is wrappable when no parameter set
      Returns:
      This
    • setRange

      public UIIntegerBox setRange(int minValue, int maxValue)
      Sets the range of the input box, inclusive
      Parameters:
      minValue - Minimum value (inclusive)
      maxValue - Maximum value (inclusive)
      Returns:
      this
    • getFillWidthNormalized

      protected double getFillWidthNormalized()
      Overrides:
      getFillWidthNormalized in class UIInputBox
    • getValue

      public int getValue()
    • getValueString

      public String getValueString()
      Specified by:
      getValueString in class UIInputBox
    • setValue

      public UIIntegerBox setValue(int value)
    • setValue

      protected UIIntegerBox setValue(int value, boolean pushToParameter)
    • onValueChange

      protected void onValueChange(int value)
      Subclasses may override to handle value changes
      Parameters:
      value - New value being set
    • saveEditBuffer

      protected void saveEditBuffer(String editBuffer)
      Specified by:
      saveEditBuffer in class UIInputBox
    • isValidCharacter

      protected boolean isValidCharacter(char keyChar)
      Specified by:
      isValidCharacter in class UIInputBox
    • incrementValue

      protected void incrementValue(KeyEvent keyEvent)
      Description copied from class: UIInputBox
      Subclasses may optionally override to decrement value in response to arrows. Increment is invoked for the right or up keys.
      Overrides:
      incrementValue in class UIInputBox
      Parameters:
      keyEvent - Key event
    • decrementValue

      protected void decrementValue(KeyEvent keyEvent)
      Description copied from class: UIInputBox
      Subclasses may optionally override to decrement value in response to arrows. Decrement is invoked for the left or down arrow keys.
      Overrides:
      decrementValue in class UIInputBox
      Parameters:
      keyEvent - Key event
    • incrementMouseValue

      protected void incrementMouseValue(MouseEvent mouseEvent, int offset)
      Description copied from class: UIInputBox
      Subclasses may optionally implement to change value based upon mouse click+drag in the box.
      Overrides:
      incrementMouseValue in class UIInputBox
      Parameters:
      mouseEvent - Mouse event
      offset - Units of mouse movement, positive or negative
    • getControlTarget

      public LXNormalizedParameter getControlTarget()
      Specified by:
      getControlTarget in interface UIControlTarget
    • getModulationTarget

      public LXCompoundModulation.Target getModulationTarget()
      Specified by:
      getModulationTarget in interface UIModulationTarget
    • dispose

      public void dispose()
      Overrides:
      dispose in class UINumberBox