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, ychildren, 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, setYaddLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getDescription, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onBlur, onFocus, onUIResize, removeLoopTask, toggleVisibleonKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseOver, onMouseReleased, onMouseWheelpublic 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)
UIEventHandleronKeyPressed in class UIEventHandlerkeyEvent - Key eventkeyChar - Key characterkeyCode - Key code valuepublic void onMouseOut(MouseEvent mouseEvent)
UIEventHandleronMouseOut in class UIEventHandlermouseEvent - Mouse Eventpublic void onMouseMoved(MouseEvent mouseEvent, float x, float y)
UIEventHandleronMouseMoved in class UIEventHandlermouseEvent - Mouse eventx - x-coordinatey - y-coordinatepublic void onMousePressed(MouseEvent mouseEvent, float x, float y)
UIEventHandleronMousePressed in class UIEventHandlermouseEvent - Mouse eventx - x-coordinatey - y-coordinateLX library by Mark C. Slee. © 2012-2020