Package heronarts.glx.ui
Class UI
java.lang.Object
heronarts.glx.ui.UI
- Direct Known Subclasses:
LXStudio.UI
Top-level container for all overlay UI elements.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classSpecification of a relative position from one element to anotherclass -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringParameterprotected UI.CoordinateSystemfinal MutableParameterfinal GLXfinal UI.Profilerfinal StringParameterfinal UIThemeUI look and feelfinal VGraphics -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLayer(UI2dContext layer) Add a 2d context to this UIaddLayer(UI3dContext layer) Add a 3d context to this UIaddLoopTask(LXLoopTask loopTask) Add a task to be performed on every loop of the UI engine.protected voidbringToTop(UI2dContext layer) Brings a layer to the top of the UI stackclearContextOverlay(UI2dComponent contextOverlay) voiddispose()final voiddraw()Draws the UIprotected voidendDraw()voidvoidvoidgamepadEvent(GamepadEvent gamepadEvent) static UIget()floatfloatfloatfloatgetWidth()voidmapModulationSource(UIModulationSource modulationSource) mapModulationSource(UIModulationSource modulationSource, boolean preserveEngine) mapModulationSource(UIModulationSource modulationSource, LXModulationEngine modulationEngine) mapTriggerSource(UITriggerSource triggerSource) mapTriggerSource(UITriggerSource triggerSource, boolean preserveEngine) mapTriggerSource(UITriggerSource triggerSource, LXModulationEngine modulationEngine) voidmouseEvent(MouseEvent mouseEvent) protected voidonResize()voidredraw()removeLayer(UI2dContext layer) Remove a 2d context from this UIremoveLayer(UI3dContext layer) removeLoopTask(LXLoopTask loopTask) Remove a task from the UI enginevoidresize()resizeContextOverlay(UI2dComponent contextOverlay) setCoordinateSystem(UI.CoordinateSystem coordinateSystem) setHighlightModulationTarget(LXParameter highlightModulationTarget) setHighlightParameterModulation(LXParameterModulation highlightParameterModulation) voidsetMouseoverHelpText(String helpText) setPositionRelative(UI2dComponent target, UIObject source, boolean clamp, UI.Position... positions) Position the target element relative to the targetsetPositionRelative(UI2dComponent target, UIObject source, UI.Position... positions) Position the target element relative to the targetsetTopLevelKeyEventHandler(UIEventHandler eventHandler) Sets an object to handle top-level input eventsshowContextDialogMessage(String message) showContextOverlay(UI2dComponent contextOverlay) showContextOverlay(UI2dComponent contextOverlay, boolean clamp, UIObject source, UI.Position... positions) showContextOverlay(UI2dComponent contextOverlay, UIObject source, UI.Position... positions) showDropMenu(UIContextMenu dropMenu) void
-
Field Details
-
profiler
-
lx
-
vg
-
contextualHelpText
-
statusMessageText
-
coordinateSystem
-
theme
UI look and feel -
highlightModulationTargetChanged
-
-
Constructor Details
-
UI
- Throws:
IOException
-
-
Method Details
-
showError
public void showError() -
getHighlightModulationTarget
-
setHighlightModulationTarget
-
setHighlightParameterModulation
-
setCoordinateSystem
-
redraw
public void redraw() -
get
-
focusPrev
-
focusNext
-
setMouseoverHelpText
-
getMouseCursor
-
setTopLevelKeyEventHandler
Sets an object to handle top-level input events- Parameters:
eventHandler- Event handler- Returns:
- this
-
mapModulationOff
-
mapTriggerSource
-
mapTriggerSource
-
mapTriggerSource
-
mapTriggerSource
-
mapModulationSource
-
mapModulationSource
-
mapModulationSource
-
mapModulationSource
public UI mapModulationSource(UIModulationSource modulationSource, LXModulationEngine modulationEngine) -
addLoopTask
Add a task to be performed on every loop of the UI engine.- Parameters:
loopTask- Task to perform on every UI loop- Returns:
- this
-
removeLoopTask
Remove a task from the UI engine- Parameters:
loopTask- Task to stop performing on every UI loop- Returns:
- this
-
addLayer
Add a 2d context to this UI- Parameters:
layer- UI layer- Returns:
- this
-
removeLayer
Remove a 2d context from this UI- Parameters:
layer- UI layer- Returns:
- this UI
-
addLayer
Add a 3d context to this UI- Parameters:
layer- 3d context- Returns:
- this UI
-
removeLayer
-
bringToTop
Brings a layer to the top of the UI stack- Parameters:
layer- UI layer- Returns:
- this UI
-
hideContextOverlay
-
showContextDialogMessage
-
showContextOverlay
-
setPositionRelative
Position the target element relative to the target- Parameters:
target- Target element (to be positioned)source- Source element (relative base)positions- Position specifications- Returns:
- this
-
setPositionRelative
public UI setPositionRelative(UI2dComponent target, UIObject source, boolean clamp, UI.Position... positions) Position the target element relative to the target- Parameters:
target- Target element (to be positioned)source- Source element (relative base)clamp- Whether to perform validity checks and clamp target placement in the UI windowpositions- Position specifications- Returns:
- this
-
showContextOverlay
public UI showContextOverlay(UI2dComponent contextOverlay, UIObject source, UI.Position... positions) -
showContextOverlay
public UI showContextOverlay(UI2dComponent contextOverlay, boolean clamp, UIObject source, UI.Position... positions) -
resizeContextOverlay
-
clearContextOverlay
-
hideDropMenu
-
showDropMenu
-
getContentScaleX
public float getContentScaleX() -
getContentScaleY
public float getContentScaleY() -
getWidth
public float getWidth() -
getHeight
public float getHeight() -
resize
public void resize() -
draw
public final void draw()Draws the UI -
beginDraw
protected void beginDraw() -
endDraw
protected void endDraw() -
onResize
protected void onResize() -
mouseEvent
-
keyEvent
-
gamepadEvent
-
dispose
public void dispose()
-