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, y
children, 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, setPadding
addToContainer, 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, 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, onMouseMoved, onMouseOut, onMouseOver, onMouseReleased, onMouseWheel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected 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)
UI2dComponent
addToContainer
in class UI2dComponent
container
- Container to place inindex
- At which index to place this object in parent containerprotected void reflow()
reflow
in class UI2dContainer
protected UIDevice setEnabledButton(BooleanParameter p)
protected UIDevice setEnabledButton(BooleanParameter p, boolean isMomentary)
protected UIDevice setTitle(StringParameter title)
public void drawFocus(UI ui, PGraphics pg)
UI2dComponent
drawFocus
in class UI2dComponent
ui
- UIpg
- PGraphicspublic void onDraw(UI ui, PGraphics pg)
UIObject
public void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
UIEventHandler
onKeyPressed
in class UI2dContainer
keyEvent
- Key eventkeyChar
- Key characterkeyCode
- Key code valuepublic void onMousePressed(MouseEvent mouseEvent, float mx, float my)
UIEventHandler
onMousePressed
in class UIEventHandler
mouseEvent
- Mouse eventmx
- x-coordinatemy
- y-coordinateLX library by Mark C. Slee. © 2012-2020