public class UIContextMenu extends UI2dComponent
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_WIDTH |
bottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, y
children, hasFocus, mousePressContextMenu, visible
Constructor and Description |
---|
UIContextMenu(float x,
float y,
float w,
float h) |
Modifier and Type | Method and Description |
---|---|
void |
onDraw(UI ui,
PGraphics pg)
Subclasses may override to draw some other kind of drop menu
|
void |
onKeyPressed(KeyEvent keyEvent,
char keyChar,
int keyCode)
Subclasses override to receive key events
|
void |
onMouseMoved(MouseEvent mouseEvent,
float x,
float y)
Subclasses override to receive mouse events
|
void |
onMouseOut(MouseEvent mouseEvent)
Subclasses override to receive events when mouse moves out of this object
|
void |
onMousePressed(MouseEvent mouseEvent,
float x,
float y)
Subclasses override to receive mouse events
|
UIContextMenu |
setActions(UIContextActions.Action[] actions) |
UIContextMenu |
setHighlight(int highlight) |
UIContextMenu |
setPadding(float padding) |
UIContextMenu |
setRowHeight(float rowHeight) |
addToContainer, addToContainer, breakTextToWidth, clipTextToWidth, contains, drawBackground, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, getBackgroundColor, getBorderColor, getBorderRounding, getBorderWeight, getContainer, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getNextSibling, getParent, getPrevSibling, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, onResize, redraw, removeFromContainer, setBackground, setBackgroundColor, setBorder, setBorderColor, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setY
addLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getDescription, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onBlur, onFocus, onUIResize, removeLoopTask, toggleVisible
onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseOver, onMouseReleased, onMouseWheel
public static final float DEFAULT_WIDTH
public UIContextMenu setPadding(float padding)
public UIContextMenu setRowHeight(float rowHeight)
public UIContextMenu setActions(UIContextActions.Action[] actions)
public UIContextMenu setHighlight(int highlight)
public void onDraw(UI ui, PGraphics pg)
public void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
UIEventHandler
onKeyPressed
in class UIEventHandler
keyEvent
- Key eventkeyChar
- Key characterkeyCode
- Key code valuepublic void onMouseOut(MouseEvent mouseEvent)
UIEventHandler
onMouseOut
in class UIEventHandler
mouseEvent
- Mouse Eventpublic void onMouseMoved(MouseEvent mouseEvent, float x, float y)
UIEventHandler
onMouseMoved
in class UIEventHandler
mouseEvent
- Mouse eventx
- x-coordinatey
- y-coordinatepublic void onMousePressed(MouseEvent mouseEvent, float x, float y)
UIEventHandler
onMousePressed
in class UIEventHandler
mouseEvent
- Mouse eventx
- x-coordinatey
- y-coordinateLX library by Mark C. Slee. © 2012-2020