Class UIDropMenu

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

  • Constructor Details

    • UIDropMenu

      public UIDropMenu(float x, float y, float w, DiscreteParameter parameter)
    • UIDropMenu

      public UIDropMenu(float w, DiscreteParameter parameter)
    • UIDropMenu

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

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

    • setMenuWidth

      public UIDropMenu setMenuWidth(float menuWidth)
    • 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
    • setEnabled

      public UIDropMenu setEnabled(boolean enabled)
    • setParameter

      public UIDropMenu setParameter(DiscreteParameter parameter)
    • onParameterChanged

      public void onParameterChanged(LXParameter p)
      Description copied from interface: LXParameterListener
      Invoked when the value of a parameter is changed.
      Specified by:
      onParameterChanged in interface LXParameterListener
      Parameters:
      p - The parameter that has changed its value
    • setDirection

      public UIDropMenu setDirection(UIDropMenu.Direction direction)
      Sets the direction that this drop menu opens, up or down
      Parameters:
      direction - Direction menu should open
      Returns:
      this
    • setOptions

      public UIDropMenu setOptions(String[] options)
      Sets the list of string options to display in the menu
      Parameters:
      options - Options array
      Returns:
      this
    • getFocusSize

      protected int getFocusSize()
      Description copied from class: UI2dComponent
      Focus size for hashes drawn on the outline of the object. May be overridden.
      Overrides:
      getFocusSize in class UI2dComponent
      Returns:
      Focus hash line size
    • onDraw

      public void onDraw(UI ui, VGraphics vg)
      Description copied from class: UI2dComponent
      Subclasses should override this method to perform their drawing functions.
      Overrides:
      onDraw in class UI2dComponent
      Parameters:
      ui - UI context
      vg - Graphics context
    • onMousePressed

      public void onMousePressed(MouseEvent mouseEvent, float x, float y)
      Description copied from class: UIEventHandler
      Subclasses override to receive mouse events
      Overrides:
      onMousePressed in class UIParameterComponent
      Parameters:
      mouseEvent - Mouse event
      x - x-coordinate
      y - y-coordinate
    • onKeyPressed

      public void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
      Description copied from class: UIEventHandler
      Subclasses override to receive key events
      Overrides:
      onKeyPressed in class UIEventHandler
      Parameters:
      keyEvent - Key event
      keyChar - Key character
      keyCode - Key code value
    • 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 UIObject