Package heronarts.glx.ui
Class UI3dComponent
java.lang.Object
heronarts.glx.ui.UIEventHandler
heronarts.glx.ui.UIObject
heronarts.glx.ui.UI3dComponent
- All Implemented Interfaces:
LXLoopTask
- Direct Known Subclasses:
UIAxes,UIGrid,UIModelMeshes,UINormalizationBounds,UIPointCloud,UISoundStage
A component in a UI3dContext. Draws itself and may draw children.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal UI3dComponentaddChild(UI3dComponent child) Adds a child to this componentbooleancontains(float x, float y) Whether the given point is contained by this objectfinal voidDraw the given component into the View contextfloatfloatgetWidth()protected voidonCameraChanged(UI ui, UI3dContext context) Invoked when the camera position of the parent context has changedprotected voidSubclasses should override this method with specific drawing routingsfinal UI3dComponentremoveChild(UI3dComponent child) Removes a child from this componentMethods inherited from class heronarts.glx.ui.UIObject
addListener, addListener, addLoopTask, addLoopTask, blur, bringToFront, dispose, focus, getDescription, getFocusedChild, getLX, getParent, getUI, getX, getY, hasDirectFocus, hasFocus, isVisible, isVisible, loop, onBlur, onFocus, onUIResize, removeLoopTask, requireUIThread, setConsumeMousePress, setDebugId, setDescription, setMouseCursor, setVisible, toggleVisible, toStringMethods inherited from class heronarts.glx.ui.UIEventHandler
onGamepadAxisChanged, onGamepadButtonPressed, onGamepadButtonReleased, onKeyPressed, onKeyReleased, onMouseDragged, onMouseMoved, onMouseOut, onMouseOver, onMousePressed, onMouseReleased, onMouseScroll
-
Constructor Details
-
UI3dComponent
public UI3dComponent()
-
-
Method Details
-
contains
public boolean contains(float x, float y) Description copied from class:UIObjectWhether the given point is contained by this object -
getWidth
public float getWidth() -
getHeight
public float getHeight() -
getContext
-
addChild
Adds a child to this component- Parameters:
child- Child component- Returns:
- this
-
removeChild
Removes a child from this component- Parameters:
child- Child component- Returns:
- this
-
draw
Draw the given component into the View context- Parameters:
ui- UI contextview- View to draw into
-
onDraw
Subclasses should override this method with specific drawing routings- Parameters:
ui- UIview- View to draw into
-
onCameraChanged
Invoked when the camera position of the parent context has changed- Parameters:
ui- UIcontext- Context being rendered into
-