public class UIDropMenu extends UIParameterComponent implements UIFocus, UIControlTarget, LXParameterListener
| Modifier and Type | Class and Description |
|---|---|
static class |
UIDropMenu.Direction |
UIContextActions.ActionDEFAULT_HEIGHT, useCommandEnginebottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, ychildren, hasFocus, mousePressContextMenu, visible| Constructor and Description |
|---|
UIDropMenu(float w,
DiscreteParameter parameter) |
UIDropMenu(float w,
float h,
DiscreteParameter parameter) |
UIDropMenu(float x,
float y,
float w,
float h) |
UIDropMenu(float x,
float y,
float w,
float h,
DiscreteParameter parameter) |
| Modifier and Type | Method and Description |
|---|---|
LXParameter |
getControlTarget() |
String |
getDescription()
Objects are encouraged to override this method providing a helpful String displayed to the user explaining
the function of this UI component.
|
protected int |
getFocusSize()
Focus size for hashes drawn on the outline of the object.
|
DiscreteParameter |
getParameter() |
void |
onDraw(UI ui,
PGraphics pg)
Subclasses should override this method to perform their drawing functions.
|
void |
onKeyPressed(KeyEvent keyEvent,
char keyChar,
int keyCode)
Subclasses override to receive key events
|
void |
onMousePressed(MouseEvent mouseEvent,
float x,
float y)
Subclasses override to receive mouse events
|
void |
onParameterChanged(LXParameter p)
Invoked when the value of a parameter is changed.
|
UIDropMenu |
setDirection(UIDropMenu.Direction direction)
Sets the direction that this drop menu opens, up or down
|
UIDropMenu |
setEnabled(boolean enabled) |
UIDropMenu |
setOptions(String[] options)
Sets the list of string options to display in the menu
|
UIDropMenu |
setParameter(DiscreteParameter parameter) |
getContextActions, getOscAddress, onMouseReleased, setNormalizedCommand, setUseCommandEngineaddToContainer, addToContainer, breakTextToWidth, clipTextToWidth, contains, drawBackground, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, getBackgroundColor, getBorderColor, getBorderRounding, getBorderWeight, getContainer, getFocusColor, 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, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onBlur, onFocus, onUIResize, removeLoopTask, toggleVisibleonKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseMoved, onMouseOut, onMouseOver, onMouseWheelpublic UIDropMenu(float x,
float y,
float w,
float h)
public UIDropMenu(float w,
DiscreteParameter parameter)
public UIDropMenu(float w,
float h,
DiscreteParameter parameter)
public UIDropMenu(float x,
float y,
float w,
float h,
DiscreteParameter parameter)
public String getDescription()
UIObjectgetDescription in class UIObjectpublic DiscreteParameter getParameter()
getParameter in class UIParameterComponentpublic UIDropMenu setEnabled(boolean enabled)
public UIDropMenu setParameter(DiscreteParameter parameter)
public void onParameterChanged(LXParameter p)
LXParameterListeneronParameterChanged in interface LXParameterListenerp - The parameter that has changed its valuepublic UIDropMenu setDirection(UIDropMenu.Direction direction)
direction - Direction menu should openpublic UIDropMenu setOptions(String[] options)
options - Options arrayprotected int getFocusSize()
UI2dComponentgetFocusSize in class UI2dComponentpublic void onDraw(UI ui, PGraphics pg)
UIObjectpublic void onMousePressed(MouseEvent mouseEvent, float x, float y)
UIEventHandleronMousePressed in class UIParameterComponentmouseEvent - Mouse eventx - x-coordinatey - y-coordinatepublic void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
UIEventHandleronKeyPressed in class UIEventHandlerkeyEvent - Key eventkeyChar - Key characterkeyCode - Key code valuepublic LXParameter getControlTarget()
getControlTarget in interface UIControlTargetLX library by Mark C. Slee. © 2012-2020