Package heronarts.lx.studio.ui.clip
Class UIClipButton
java.lang.Object
heronarts.glx.ui.UIEventHandler
heronarts.glx.ui.UIObject
heronarts.glx.ui.UI2dComponent
heronarts.glx.ui.UI2dContainer
heronarts.lx.studio.ui.clip.UIClipButton
- All Implemented Interfaces:
UIContainer
,UIContextActions
,UIControlTarget
,UICopy
,UIDuplicate
,UIFocus
,UIKeyFocus
,UIMouseFocus
,UIPaste
,UITabFocus
,UITriggerTarget
,LXLoopTask
,Iterable<UIObject>
public class UIClipButton
extends UI2dContainer
implements UIFocus, UITriggerTarget, UIControlTarget, UIContextActions, UIDuplicate
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.glx.ui.UI2dContainer
UI2dContainer.ArrowKeyFocus, UI2dContainer.Layout, UI2dContainer.Position
Nested classes/interfaces inherited from class heronarts.glx.ui.UI2dComponent
UI2dComponent.Scissor, UI2dComponent.Scissored, UI2dComponent.UIDragReorder
Nested classes/interfaces inherited from interface heronarts.glx.ui.UIContextActions
UIContextActions.Action
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
protected static final int
protected final LX
protected final UIMixer
static final int
protected final int
Fields inherited from class heronarts.glx.ui.UI2dComponent
debug, debugName, height, marginBottom, marginLeft, marginRight, marginTop, redraw, scissor, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, width, x, y
-
Constructor Summary
ModifierConstructorDescriptionprotected
UIClipButton
(UI ui, UIMixer mixer, LX lx, LXBus bus, int index, float x, float y, float width) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
static void
drawPlayTriangle
(UI ui, VGraphics vg) Returns a list of context actions that should be shown for this itemObjects are encouraged to override this method providing a helpful String displayed to the user explaining the function of this UI component.onCopy()
protected void
Subclasses should override this method to perform their drawing functions.void
onDuplicate
(KeyEvent keyEvent) protected void
Subclasses override when element is focusedprotected void
onKeyPressed
(KeyEvent keyEvent, char keyChar, int keyCode) Subclasses override to receive key eventsprotected void
onMousePressed
(MouseEvent mouseEvent, float mx, float my) Subclasses override to receive mouse eventsprotected void
onMouseReleased
(MouseEvent mouseEvent, float mx, float my) Subclasses override to receive mouse eventsvoid
onPaste
(LXClipboardItem item) protected void
protected void
setCondensed
(boolean condensed) Methods inherited from class heronarts.glx.ui.UI2dContainer
addChildren, addTopLevelComponent, getBottomPadding, getChild, getChildren, getContentHeight, getContentTarget, getContentWidth, getLeftPadding, getRightPadding, getScrollHeight, getScrollWidth, getTopPadding, hasDragToReorder, iterator, newHorizontalContainer, newHorizontalContainer, newHorizontalContainer, newVerticalContainer, newVerticalContainer, newVerticalContainer, onReflow, reflow, removeAllChildren, removeAllChildren, setArrowKeyFocus, setChildMargin, setChildSpacing, setChildSpacing, setContentHeight, setContentSize, setContentTarget, setContentWidth, setDragToReorder, setLayout, setLayout, setMinHeight, setMinWidth, setPadding, setPadding, setPadding
Methods inherited from class heronarts.glx.ui.UI2dComponent
addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, assertValidContainer, clipTextToWidth, clipTextToWidth, contains, dbch, drawBackground, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, drawParentBackground, getAbsoluteX, getAbsoluteY, getBackgroundColor, getBorderColor, getBorderWeight, getContainer, getDebugClassHierarchy, getDebugClassHierarchy, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getMappableParameter, getNextSibling, getParent, getPrevSibling, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, onResize, redraw, removeFromContainer, removeFromContainer, setBackground, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBorderColor, setBorderRounding, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setContainerPosition, setDebug, setDebug, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusBackgroundColor, setFocusColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setY, vgRoundedRect, vgRoundedRect, vgRoundedRect
Methods inherited from class heronarts.glx.ui.UIObject
addListener, addListener, addLoopTask, blur, bringToFront, focus, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, loop, onBlur, onUIResize, removeLoopTask, requireUIThread, setConsumeMousePress, setDebugId, toggleVisible, toString
Methods inherited from class heronarts.glx.ui.UIEventHandler
onKeyReleased, onMouseDragged, onMouseMoved, onMouseOut, onMouseOver, onMouseScroll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
HEIGHT
public static final int HEIGHT- See Also:
-
PADDING
public static final int PADDING- See Also:
-
LABEL_X
protected static final int LABEL_X- See Also:
-
mixer
-
lx
-
slotIndex
protected final int slotIndex
-
-
Constructor Details
-
UIClipButton
-
-
Method Details
-
getDescription
Description copied from class:UIObject
Objects are encouraged to override this method providing a helpful String displayed to the user explaining the function of this UI component. If no help is available, return null rather than an empty String.- Overrides:
getDescription
in classUIObject
- Returns:
- Helpful contextual string explaining function of this element
-
setCondensed
protected void setCondensed(boolean condensed) -
setClip
-
onFocus
Description copied from class:UIObject
Subclasses override when element is focused -
drawPlayTriangle
-
onDraw
Description copied from class:UI2dComponent
Subclasses should override this method to perform their drawing functions.- Overrides:
onDraw
in classUI2dContainer
- Parameters:
ui
- UI contextvg
- Graphics context
-
onKeyPressed
Description copied from class:UIEventHandler
Subclasses override to receive key events- Overrides:
onKeyPressed
in classUI2dContainer
- Parameters:
keyEvent
- Key eventkeyChar
- Key characterkeyCode
- Key code value
-
onMousePressed
Description copied from class:UIEventHandler
Subclasses override to receive mouse events- Overrides:
onMousePressed
in classUIEventHandler
- Parameters:
mouseEvent
- Mouse eventmx
- x-coordinatemy
- y-coordinate
-
onMouseReleased
Description copied from class:UIEventHandler
Subclasses override to receive mouse events- Overrides:
onMouseReleased
in classUIEventHandler
- Parameters:
mouseEvent
- Mouse eventmx
- x-coordinatemy
- y-coordinate
-
getTriggerTarget
- Specified by:
getTriggerTarget
in interfaceUITriggerTarget
-
getControlTarget
- Specified by:
getControlTarget
in interfaceUIControlTarget
-
onCopy
-
onPaste
-
onDuplicate
- Specified by:
onDuplicate
in interfaceUIDuplicate
-
getContextActions
Description copied from interface:UIContextActions
Returns a list of context actions that should be shown for this item- Specified by:
getContextActions
in interfaceUIContextActions
- Returns:
- List of context actions
-
dispose
public void dispose()
-