Class UIDoubleBox

All Implemented Interfaces:
UIContextActions, UIControlTarget, UIFocus, UIKeyFocus, UIModulationSource, UIModulationTarget, UIMouseFocus, UITabFocus, LXLoopTask

public class UIDoubleBox extends UINumberBox implements UIControlTarget, UIModulationSource, UIModulationTarget
  • Constructor Details

    • UIDoubleBox

      public UIDoubleBox()
    • UIDoubleBox

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

      public UIDoubleBox(float w, BoundedParameter parameter)
    • UIDoubleBox

      public UIDoubleBox(float w, float h, BoundedParameter parameter)
    • UIDoubleBox

      public UIDoubleBox(float x, float y, float w, BoundedParameter parameter)
    • UIDoubleBox

      public UIDoubleBox(float x, float y, float w, float h, BoundedParameter parameter)
  • Method Details

    • setNormalizedMouseEditing

      public UIDoubleBox setNormalizedMouseEditing(boolean normalizedMouseEditing)
    • 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 BoundedParameter getParameter()
      Specified by:
      getParameter in class UIParameterComponent
    • setParameter

      public UIDoubleBox setParameter(BoundedParameter parameter)
    • setRange

      public UIDoubleBox setRange(double minValue, double maxValue)
    • getBaseNormalized

      protected double getBaseNormalized()
    • setNormalized

      public UIDoubleBox setNormalized(double normalized)
    • getFillWidthNormalized

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

      public double getValue()
    • setValue

      protected UIDoubleBox setValue(LXParameter p)
    • setValue

      public UIDoubleBox setValue(double value)
    • setValue

      protected UIDoubleBox setValue(double value, boolean pushToParameter)
    • getValueString

      protected String getValueString()
      Specified by:
      getValueString in class UIInputBox
    • onValueChange

      protected void onValueChange(double value)
      Invoked when value changes, subclasses may override to handle.
      Parameters:
      value - New value that is being set
    • saveEditBuffer

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

      public static boolean isValidInputCharacter(char keyChar)
    • isValidCharacter

      protected boolean isValidCharacter(char keyChar)
      Specified by:
      isValidCharacter in class UIInputBox
    • 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
    • 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
    • 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
    • getModulationSource

      public LXNormalizedParameter getModulationSource()
      Specified by:
      getModulationSource in interface UIModulationSource
    • getModulationTarget

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

      protected void onMouseDragged(MouseEvent mouseEvent, float mx, float my, float dx, float dy)
      Description copied from class: UIEventHandler
      Subclasses override to receive mouse events
      Overrides:
      onMouseDragged in class UIInputBox
      Parameters:
      mouseEvent - Mouse event
      mx - x-coordinate
      my - y-coordinate
      dx - movement in x
      dy - movement in y
    • dispose

      public void dispose()
      Overrides:
      dispose in class UINumberBox