Package heronarts.glx.ui.component
Class UIDoubleBox
- All Implemented Interfaces:
UIContextActions,UIControlTarget,UIFocus,UIKeyFocus,UIModulationSource,UIModulationTarget,UIMouseFocus,UITabFocus,LXLoopTask
public class UIDoubleBox
extends UINumberBox
implements UIControlTarget, UIModulationSource, UIModulationTarget
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.glx.ui.component.UIInputBox
UIInputBox.EditState, UIInputBox.FillStyle, UIInputBox.ProgressIndicatorNested classes/interfaces inherited from class heronarts.glx.ui.UI2dComponent
UI2dComponent.Scissor, UI2dComponent.Scissored, UI2dComponent.UIDragReorderNested classes/interfaces inherited from interface heronarts.glx.ui.UIContextActions
UIContextActions.Action, UIContextActions.ContextAction -
Field Summary
Fields inherited from class heronarts.glx.ui.component.UINumberBox
hasShiftMultiplier, shiftMultiplierFields inherited from class heronarts.glx.ui.component.UIInputBox
editable, editing, enabled, fillColor, fillStyle, hasFill, mouseEditable, returnKeyEditFields inherited from class heronarts.glx.ui.component.UIParameterComponent
DEFAULT_HEIGHT, useCommandEngineFields inherited from class heronarts.glx.ui.UI2dComponent
borderRoundingBottomLeft, borderRoundingBottomRight, borderRoundingTopLeft, borderRoundingTopRight, debug, debugName, hasBorderRounding, height, marginBottom, marginLeft, marginRight, marginTop, redraw, scissor, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, width, x, y -
Constructor Summary
ConstructorsConstructorDescriptionUIDoubleBox(float x, float y, float w, float h) UIDoubleBox(float x, float y, float w, float h, BoundedParameter parameter) UIDoubleBox(float x, float y, float w, BoundedParameter parameter) UIDoubleBox(float w, float h, BoundedParameter parameter) UIDoubleBox(float w, BoundedParameter parameter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecrementValue(KeyEvent keyEvent) Subclasses may optionally override to decrement value in response to arrows.voiddispose()protected doubleObjects are encouraged to override this method providing a helpful String displayed to the user explaining the function of this UI component.protected doubledoublegetValue()protected Stringprotected voidincrementMouseValue(MouseEvent mouseEvent, int offset) Subclasses may optionally implement to change value based upon mouse click+drag in the box.protected voidincrementValue(KeyEvent keyEvent) Subclasses may optionally override to decrement value in response to arrows.protected booleanisValidCharacter(char keyChar) static booleanisValidInputCharacter(char keyChar) protected voidonMouseDragged(MouseEvent mouseEvent, float mx, float my, float dx, float dy) Subclasses override to receive mouse eventsprotected voidonValueChange(double value) Invoked when value changes, subclasses may override to handle.protected voidsaveEditBuffer(String editBuffer) setNormalized(double normalized) setNormalizedMouseEditing(boolean normalizedMouseEditing) setParameter(BoundedParameter parameter) setRange(double minValue, double maxValue) setValue(double value) protected UIDoubleBoxsetValue(double value, boolean pushToParameter) protected UIDoubleBoxMethods inherited from class heronarts.glx.ui.component.UINumberBox
drawBorder, getContextActions, onMousePressed, setFill, setFillColor, setFillStyle, setModulationTarget, setShiftMultiplierMethods inherited from class heronarts.glx.ui.component.UIInputBox
disableImmediateAppend, disableImmediateEdit, disableReturnKeyEdit, edit, edit, editAppend, enableImmediateAppend, enableImmediateEdit, enableReturnKeyEdit, getEditBuffer, getEditRange, getInitialEditBufferValue, isEditable, isEnabled, onBlur, onDraw, onDrawText, onEditChange, onEditFinished, onKeyPressed, onMouseReleased, setEditable, setEnabled, setMouseEditable, setProgressColor, setProgressColor, setProgressColor, setProgressIndicator, setValueCommandMethods inherited from class heronarts.glx.ui.component.UIParameterComponent
getOscAddress, setEnableContextActions, setModulationRangeCommand, setNormalizedCommand, setUseCommandEngineMethods inherited from class heronarts.glx.ui.UI2dComponent
addAfterSibling, addBeforeSibling, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, addToContainer, assertValidContainer, clipTextToWidth, clipTextToWidth, contains, dbch, drawBackground, drawComponentBackground, drawFocus, drawFocusCorners, drawFocusCorners, drawParentBackground, getAbsoluteX, getAbsoluteY, getBackgroundColor, getBorderColor, getBorderWeight, getBottomMargin, getContainer, getDebugClassHierarchy, getDebugClassHierarchy, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getLeftMargin, getMappableParameter, getNextSibling, getNextSibling, getParent, getPrevSibling, getPrevSibling, getRightMargin, getTopMargin, 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, vgRoundedRectMethods inherited from class heronarts.glx.ui.UIObject
addListener, addListener, addLoopTask, addLoopTask, blur, bringToFront, focus, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, isVisible, loop, onFocus, onUIResize, removeLoopTask, requireUIThread, setConsumeMousePress, setDebugId, setMouseCursor, toggleVisible, toStringMethods inherited from class heronarts.glx.ui.UIEventHandler
onGamepadAxisChanged, onGamepadButtonPressed, onGamepadButtonReleased, onKeyReleased, onMouseMoved, onMouseOut, onMouseOver, onMouseScroll
-
Constructor Details
-
UIDoubleBox
public UIDoubleBox() -
UIDoubleBox
public UIDoubleBox(float x, float y, float w, float h) -
UIDoubleBox
-
UIDoubleBox
-
UIDoubleBox
-
UIDoubleBox
-
-
Method Details
-
setNormalizedMouseEditing
-
getDescription
Description copied from class:UIObjectObjects 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:
getDescriptionin classUIObject- Returns:
- Helpful contextual string explaining function of this element
-
getParameter
- Specified by:
getParameterin classUIParameterComponent
-
setParameter
-
setRange
-
getBaseNormalized
protected double getBaseNormalized() -
setNormalized
-
getFillWidthNormalized
protected double getFillWidthNormalized()- Overrides:
getFillWidthNormalizedin classUIInputBox
-
getValue
public double getValue() -
setValue
-
setValue
-
setValue
-
getValueString
- Specified by:
getValueStringin classUIInputBox
-
onValueChange
protected void onValueChange(double value) Invoked when value changes, subclasses may override to handle.- Parameters:
value- New value that is being set
-
saveEditBuffer
- Specified by:
saveEditBufferin classUIInputBox
-
isValidInputCharacter
public static boolean isValidInputCharacter(char keyChar) -
isValidCharacter
protected boolean isValidCharacter(char keyChar) - Specified by:
isValidCharacterin classUIInputBox
-
decrementValue
Description copied from class:UIInputBoxSubclasses may optionally override to decrement value in response to arrows. Decrement is invoked for the left or down arrow keys.- Overrides:
decrementValuein classUIInputBox- Parameters:
keyEvent- Key event
-
incrementValue
Description copied from class:UIInputBoxSubclasses may optionally override to decrement value in response to arrows. Increment is invoked for the right or up keys.- Overrides:
incrementValuein classUIInputBox- Parameters:
keyEvent- Key event
-
incrementMouseValue
Description copied from class:UIInputBoxSubclasses may optionally implement to change value based upon mouse click+drag in the box.- Overrides:
incrementMouseValuein classUIInputBox- Parameters:
mouseEvent- Mouse eventoffset- Units of mouse movement, positive or negative
-
getControlTarget
- Specified by:
getControlTargetin interfaceUIControlTarget
-
getModulationSource
- Specified by:
getModulationSourcein interfaceUIModulationSource
-
getModulationTarget
- Specified by:
getModulationTargetin interfaceUIModulationTarget
-
onMouseDragged
Description copied from class:UIEventHandlerSubclasses override to receive mouse events- Overrides:
onMouseDraggedin classUIInputBox- Parameters:
mouseEvent- Mouse eventmx- x-coordinatemy- y-coordinatedx- movement in xdy- movement in y
-
dispose
public void dispose()- Overrides:
disposein classUINumberBox
-