Package heronarts.glx.ui.component
Class UIContextMenu
java.lang.Object
heronarts.glx.ui.UIEventHandler
heronarts.glx.ui.UIObject
heronarts.glx.ui.UI2dComponent
heronarts.glx.ui.UI2dContainer
heronarts.glx.ui.component.UIContextMenu
- All Implemented Interfaces:
UIContainer,LXLoopTask,Iterable<UIObject>
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.glx.ui.UI2dContainer
UI2dContainer.ArrowKeyFocus, UI2dContainer.Layout, UI2dContainer.PositionNested classes/interfaces inherited from class heronarts.glx.ui.UI2dComponent
UI2dComponent.Scissor, UI2dComponent.Scissored, UI2dComponent.UIDragReorder -
Field Summary
FieldsFields inherited from class heronarts.glx.ui.UI2dContainer
bottomPadding, childSpacingX, childSpacingY, leftPadding, rightPadding, topPaddingFields inherited from class heronarts.glx.ui.UI2dComponent
borderRoundingBottomLeft, borderRoundingBottomRight, borderRoundingTopLeft, borderRoundingTopRight, debug, debugName, hasBorderRounding, height, marginBottom, marginLeft, marginRight, marginTop, redraw, scissor, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, width, x, y -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrawBackground(UI ui, VGraphics vg) protected voiddrawBorder(UI ui, VGraphics vg) floatfloatReturns the height of scrolling content.protected voidSubclasses may override to draw some other kind of drop menuvoidonKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode) Subclasses override to receive key eventsvoidonMouseMoved(MouseEvent mouseEvent, float x, float y) Subclasses override to receive mouse eventsvoidonMouseOut(MouseEvent mouseEvent) Subclasses override to receive events when mouse moves out of this objectvoidonMousePressed(MouseEvent mouseEvent, float x, float y) Subclasses override to receive mouse eventssetActions(UIContextActions.Action[] actions) setHighlight(int highlight) setMaxHeight(float maxHeight) setPadding(float padding) setRowHeight(float rowHeight) Methods inherited from class heronarts.glx.ui.UI2dContainer
addChildren, addTopLevelComponent, getBottomPadding, getChild, getChildren, getChildSpacingX, getChildSpacingY, getContentHeight, getContentTarget, getContentWidth, getLeftPadding, getRightPadding, getScrollWidth, getTopPadding, hasDragToReorder, isEmpty, iterator, newHorizontalContainer, newHorizontalContainer, newHorizontalContainer, newVerticalContainer, newVerticalContainer, newVerticalContainer, onReflow, reflow, removeAllChildren, removeAllChildren, setArrowKeyFocus, setChildMargin, setChildSpacing, setChildSpacing, setChildSpacingX, setChildSpacingY, setContentHeight, setContentSize, setContentTarget, setContentWidth, setDragToReorder, setLayout, setLayout, setMinHeight, setMinWidth, setPadding, setPaddingMethods inherited from class heronarts.glx.ui.UI2dComponent
addAfterSibling, addBeforeSibling, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, assertValidContainer, clipTextToWidth, clipTextToWidth, contains, dbch, drawComponentBackground, drawFocus, drawFocusCorners, drawFocusCorners, drawParentBackground, getAbsoluteX, getAbsoluteY, getBackgroundColor, getBorderColor, getBorderWeight, getBottomMargin, getContainer, getDebugClassHierarchy, getDebugClassHierarchy, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getLeftMargin, getMappableParameter, getNextSibling, getNextSibling, getParent, getPrevSibling, getPrevSibling, getRightMargin, getTopMargin, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, onResize, redraw, removeFromContainer, removeFromContainer, setBackground, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBorderColor, setBorderRounding, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setContainerPosition, setDebug, setDebug, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusBackgroundColor, setFocusColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setY, vgRoundedRect, vgRoundedRect, vgRoundedRectMethods inherited from class heronarts.glx.ui.UIObject
addListener, addListener, addLoopTask, addLoopTask, blur, bringToFront, dispose, focus, getDescription, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, isVisible, loop, onBlur, onFocus, onUIResize, removeLoopTask, requireUIThread, setConsumeMousePress, setDebugId, setMouseCursor, toggleVisible, toStringMethods inherited from class heronarts.glx.ui.UIEventHandler
onGamepadAxisChanged, onGamepadButtonPressed, onGamepadButtonReleased, onKeyReleased, onMouseDragged, onMouseOver, onMouseReleased, onMouseScrollMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DEFAULT_WIDTH
public static final float DEFAULT_WIDTH- See Also:
-
-
Constructor Details
-
UIContextMenu
public UIContextMenu(float x, float y, float w, float h)
-
-
Method Details
-
getPadding
public float getPadding() -
setPadding
- Overrides:
setPaddingin classUI2dContainer
-
setRowHeight
-
setMaxHeight
-
setActions
-
getScrollHeight
public float getScrollHeight()Description copied from class:UI2dContainerReturns 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:
getScrollHeightin classUI2dContainer- Returns:
- Height of scrollable content
-
setHighlight
-
drawBackground
- Overrides:
drawBackgroundin classUI2dComponent
-
drawBorder
- Overrides:
drawBorderin classUI2dComponent
-
onDraw
Subclasses may override to draw some other kind of drop menu- Overrides:
onDrawin classUI2dContainer- Parameters:
ui- UI contextvg- PGraphics context
-
onKeyPressed
Description copied from class:UIEventHandlerSubclasses override to receive key events- Overrides:
onKeyPressedin classUI2dContainer- Parameters:
keyEvent- Key eventkeyChar- Key characterkeyCode- Key code value
-
onMouseOut
Description copied from class:UIEventHandlerSubclasses override to receive events when mouse moves out of this object- Overrides:
onMouseOutin classUIEventHandler- Parameters:
mouseEvent- Mouse Event
-
onMouseMoved
Description copied from class:UIEventHandlerSubclasses override to receive mouse events- Overrides:
onMouseMovedin classUIEventHandler- Parameters:
mouseEvent- Mouse eventx- x-coordinatey- y-coordinate
-
onMousePressed
Description copied from class:UIEventHandlerSubclasses override to receive mouse events- Overrides:
onMousePressedin classUIEventHandler- Parameters:
mouseEvent- Mouse eventx- x-coordinatey- y-coordinate
-