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
,UINormalizationBounds
,UIPointCloud
,UISoundStage
A component in a UI3dContext. Draws itself and may draw children.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal UI3dComponent
addChild
(UI3dComponent child) Adds a child to this componentboolean
contains
(float x, float y) Whether the given point is contained by this objectfinal void
Draw the given component into the View contextfloat
float
getWidth()
protected void
onCameraChanged
(UI ui, UI3dContext context) Invoked when the camera position of the parent context has changedprotected void
Subclasses should override this method with specific drawing routingsfinal UI3dComponent
removeChild
(UI3dComponent child) Removes a child from this componentMethods inherited from class heronarts.glx.ui.UIObject
addListener, addListener, addLoopTask, blur, bringToFront, dispose, focus, getDescription, getFocusedChild, getLX, getParent, getUI, getX, getY, hasDirectFocus, hasFocus, isVisible, loop, onBlur, onFocus, onUIResize, removeLoopTask, requireUIThread, setConsumeMousePress, setDebugId, setDescription, setVisible, toggleVisible, toString
Methods inherited from class heronarts.glx.ui.UIEventHandler
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:UIObject
Whether 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
-