Class UIContextMenu

All Implemented Interfaces:
UIContainer, LXLoopTask, Iterable<UIObject>

public class UIContextMenu extends UI2dContainer
  • Field Details

  • Constructor Details

    • UIContextMenu

      public UIContextMenu(float x, float y, float w, float h)
  • Method Details

    • getPadding

      public float getPadding()
    • setPadding

      public UIContextMenu setPadding(float padding)
      Overrides:
      setPadding in class UI2dContainer
    • setRowHeight

      public UIContextMenu setRowHeight(float rowHeight)
    • setMaxHeight

      public UIContextMenu setMaxHeight(float maxHeight)
    • setActions

      public UIContextMenu setActions(UIContextActions.Action[] actions)
    • getScrollHeight

      public float getScrollHeight()
      Description copied from class: UI2dContainer
      Returns the height of scrolling content. By default this is the same as the height of the container itself, but if the container scrolls then the scroll height may be a larger value.
      Overrides:
      getScrollHeight in class UI2dContainer
      Returns:
      Height of scrollable content
    • setHighlight

      public UIContextMenu setHighlight(int highlight)
    • drawBackground

      protected void drawBackground(UI ui, VGraphics vg)
      Overrides:
      drawBackground in class UI2dComponent
    • drawBorder

      protected void drawBorder(UI ui, VGraphics vg)
      Overrides:
      drawBorder in class UI2dComponent
    • onDraw

      protected void onDraw(UI ui, VGraphics vg)
      Subclasses may override to draw some other kind of drop menu
      Overrides:
      onDraw in class UI2dContainer
      Parameters:
      ui - UI context
      vg - PGraphics context
    • 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 UI2dContainer
      Parameters:
      keyEvent - Key event
      keyChar - Key character
      keyCode - Key code value
    • onMouseOut

      public void onMouseOut(MouseEvent mouseEvent)
      Description copied from class: UIEventHandler
      Subclasses override to receive events when mouse moves out of this object
      Overrides:
      onMouseOut in class UIEventHandler
      Parameters:
      mouseEvent - Mouse Event
    • onMouseMoved

      public void onMouseMoved(MouseEvent mouseEvent, float x, float y)
      Description copied from class: UIEventHandler
      Subclasses override to receive mouse events
      Overrides:
      onMouseMoved in class UIEventHandler
      Parameters:
      mouseEvent - Mouse event
      x - x-coordinate
      y - y-coordinate
    • 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 UIEventHandler
      Parameters:
      mouseEvent - Mouse event
      x - x-coordinate
      y - y-coordinate