public abstract class UIDevice extends UI2dContainer implements UIMouseFocus, UIKeyFocus
UI2dContainer.ArrowKeyFocus, UI2dContainer.Layout| Modifier and Type | Field and Description |
|---|---|
protected static int |
CHEVRON_PADDING |
protected LXComponent |
component |
protected UI2dContainer |
content |
protected LXDeviceComponent |
device |
protected static int |
DEVICE_BAR_WIDTH |
protected static int |
ENABLED_BUTTON_PADDING |
protected static int |
HEIGHT |
protected static int |
MARGIN |
protected static int |
MODULATOR_SIZE |
protected UI2dContainer |
modulatorContent |
protected static int |
PADDING |
protected static int |
TITLE_MARGIN |
protected static int |
TITLE_PADDING |
bottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, ychildren, hasFocus, mousePressContextMenu, visible| Modifier | Constructor and Description |
|---|---|
protected |
UIDevice(LXStudio.UI ui,
LXComponent component,
float contentWidth) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addContentPicker(LXStudio.UI ui,
LXBus bus) |
UI2dComponent |
addToContainer(UIContainer container,
int index)
Adds this component to a container at a specified index, also removing it from any
other container that is currently holding it.
|
void |
drawFocus(UI ui,
PGraphics pg)
Draws focus on this object.
|
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 mx,
float my)
Subclasses override to receive mouse events
|
protected void |
reflow() |
protected UIDevice |
setEnabledButton(BooleanParameter p) |
protected UIDevice |
setEnabledButton(BooleanParameter p,
boolean isMomentary) |
protected UIDevice |
setTitle(String title) |
protected UIDevice |
setTitle(StringParameter title) |
addChildren, addTopLevelComponent, getChild, getChildren, getContentHeight, getContentTarget, getContentWidth, iterator, newHorizontalContainer, newHorizontalContainer, newHorizontalContainer, newVerticalContainer, newVerticalContainer, newVerticalContainer, removeAllChildren, setArrowKeyFocus, setChildMargin, setChildSpacing, setChildSpacing, setContentHeight, setContentSize, setContentTarget, setContentWidth, setLayout, setMinHeight, setMinWidth, setPadding, setPadding, setPaddingaddToContainer, breakTextToWidth, clipTextToWidth, contains, drawBackground, drawBorder, 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, onMouseMoved, onMouseOut, onMouseOver, onMouseReleased, onMouseWheelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected static final int HEIGHT
protected static final int PADDING
protected static final int MARGIN
protected static final int TITLE_MARGIN
protected static final int TITLE_PADDING
protected static final int ENABLED_BUTTON_PADDING
protected static final int DEVICE_BAR_WIDTH
protected static final int CHEVRON_PADDING
protected static final int MODULATOR_SIZE
protected final UI2dContainer modulatorContent
protected final UI2dContainer content
protected final LXComponent component
protected final LXDeviceComponent device
protected UIDevice(LXStudio.UI ui, LXComponent component, float contentWidth)
protected void addContentPicker(LXStudio.UI ui, LXBus bus)
public UI2dComponent addToContainer(UIContainer container, int index)
UI2dComponentaddToContainer in class UI2dComponentcontainer - Container to place inindex - At which index to place this object in parent containerprotected void reflow()
reflow in class UI2dContainerprotected UIDevice setEnabledButton(BooleanParameter p)
protected UIDevice setEnabledButton(BooleanParameter p, boolean isMomentary)
protected UIDevice setTitle(StringParameter title)
public void drawFocus(UI ui, PGraphics pg)
UI2dComponentdrawFocus in class UI2dComponentui - UIpg - PGraphicspublic void onDraw(UI ui, PGraphics pg)
UIObjectpublic void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
UIEventHandleronKeyPressed in class UI2dContainerkeyEvent - Key eventkeyChar - Key characterkeyCode - Key code valuepublic void onMousePressed(MouseEvent mouseEvent, float mx, float my)
UIEventHandleronMousePressed in class UIEventHandlermouseEvent - Mouse eventmx - x-coordinatemy - y-coordinateLX library by Mark C. Slee. © 2012-2020