public class UIDoubleBox extends UINumberBox implements UIControlTarget, UIModulationSource, UIModulationTarget
UIInputBox.FillStyle, UIInputBox.ProgressIndicator
UIContextActions.Action
Modifier and Type | Field and Description |
---|---|
protected double |
editMultiplier |
hasShiftMultiplier, shiftMultiplier
editable, editBuffer, editing, enabled, fillColor, fillStyle, hasFill, progressFillStyle, returnKeyEdit
DEFAULT_HEIGHT, useCommandEngine
bottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, y
children, hasFocus, mousePressContextMenu, visible
Constructor and Description |
---|
UIDoubleBox() |
UIDoubleBox(float w,
BoundedParameter parameter) |
UIDoubleBox(float w,
float h,
BoundedParameter parameter) |
UIDoubleBox(float x,
float y,
float w,
BoundedParameter parameter) |
UIDoubleBox(float x,
float y,
float w,
float h) |
UIDoubleBox(float x,
float y,
float w,
float h,
BoundedParameter parameter) |
Modifier and Type | Method and Description |
---|---|
protected void |
decrementValue(KeyEvent keyEvent)
Subclasses may optionally override to decrement value in response to arrows.
|
LXParameter |
getControlTarget() |
String |
getDescription()
Objects are encouraged to override this method providing a helpful String displayed to the user explaining
the function of this UI component.
|
protected double |
getFillWidthNormalized() |
LXNormalizedParameter |
getModulationSource() |
CompoundParameter |
getModulationTarget() |
protected double |
getNormalized() |
BoundedParameter |
getParameter() |
double |
getValue() |
protected String |
getValueString() |
protected void |
incrementMouseValue(MouseEvent mouseEvent,
int offset)
Subclasses may optionally implement to change value based upon mouse click+drag in the box.
|
protected void |
incrementValue(KeyEvent keyEvent)
Subclasses may optionally override to decrement value in response to arrows.
|
protected boolean |
isValidCharacter(char keyChar) |
static boolean |
isValidInputCharacter(char keyChar) |
protected void |
onMouseDragged(MouseEvent mouseEvent,
float mx,
float my,
float dx,
float dy)
Subclasses override to receive mouse events
|
protected void |
onValueChange(double value)
Invoked when value changes, subclasses may override to handle.
|
protected void |
saveEditBuffer() |
UIDoubleBox |
setEditMultiplier(double editMultiplier) |
UIDoubleBox |
setNormalized(double normalized) |
UIDoubleBox |
setNormalizedMouseEditing(boolean normalizedMouseEditing) |
UIDoubleBox |
setParameter(BoundedParameter parameter) |
UIDoubleBox |
setRange(double minValue,
double maxValue) |
UIDoubleBox |
setValue(double value) |
protected UIDoubleBox |
setValue(double value,
boolean pushToParameter) |
protected UIDoubleBox |
setValue(LXParameter p) |
setFill, setFillColor, setFillStyle, setShiftMultiplier
edit, enableImmediateEdit, enableMousePressEdit, enableReturnKeyEdit, getEditBufferValue, isEditable, isEnabled, onBlur, onDraw, onKeyPressed, onMousePressed, onMouseReleased, setEditable, setEnabled, setProgressColor, setProgressColor, setProgressFillStyle, setProgressIndicator, setValueCommand
getContextActions, getOscAddress, setNormalizedCommand, setUseCommandEngine
addToContainer, addToContainer, breakTextToWidth, clipTextToWidth, contains, drawBackground, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, getBackgroundColor, getBorderColor, getBorderRounding, getBorderWeight, getContainer, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getNextSibling, getParent, getPrevSibling, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, onResize, redraw, removeFromContainer, setBackground, setBackgroundColor, setBorder, setBorderColor, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setY
addLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onFocus, onUIResize, removeLoopTask, toggleVisible
onKeyReleased, onKeyTyped, onMouseClicked, onMouseMoved, onMouseOut, onMouseOver, onMouseWheel
public UIDoubleBox()
public UIDoubleBox(float x, float y, float w, float h)
public UIDoubleBox(float w, BoundedParameter parameter)
public UIDoubleBox(float w, float h, BoundedParameter parameter)
public UIDoubleBox(float x, float y, float w, BoundedParameter parameter)
public UIDoubleBox(float x, float y, float w, float h, BoundedParameter parameter)
public UIDoubleBox setEditMultiplier(double editMultiplier)
public UIDoubleBox setNormalizedMouseEditing(boolean normalizedMouseEditing)
public String getDescription()
UIObject
getDescription
in class UIObject
public BoundedParameter getParameter()
getParameter
in class UIParameterComponent
public UIDoubleBox setParameter(BoundedParameter parameter)
public UIDoubleBox setRange(double minValue, double maxValue)
protected double getNormalized()
public UIDoubleBox setNormalized(double normalized)
protected double getFillWidthNormalized()
getFillWidthNormalized
in class UIInputBox
public double getValue()
protected UIDoubleBox setValue(LXParameter p)
public UIDoubleBox setValue(double value)
protected UIDoubleBox setValue(double value, boolean pushToParameter)
protected String getValueString()
getValueString
in class UIInputBox
protected void onValueChange(double value)
value
- New value that is being setprotected void saveEditBuffer()
saveEditBuffer
in class UIInputBox
public static boolean isValidInputCharacter(char keyChar)
protected boolean isValidCharacter(char keyChar)
isValidCharacter
in class UIInputBox
protected void decrementValue(KeyEvent keyEvent)
UIInputBox
decrementValue
in class UIInputBox
keyEvent
- Key eventprotected void incrementValue(KeyEvent keyEvent)
UIInputBox
incrementValue
in class UIInputBox
keyEvent
- Key eventprotected void incrementMouseValue(MouseEvent mouseEvent, int offset)
UIInputBox
incrementMouseValue
in class UIInputBox
mouseEvent
- Mouse eventoffset
- Units of mouse movement, positive or negativepublic LXParameter getControlTarget()
getControlTarget
in interface UIControlTarget
public LXNormalizedParameter getModulationSource()
getModulationSource
in interface UIModulationSource
public CompoundParameter getModulationTarget()
getModulationTarget
in interface UIModulationTarget
protected void onMouseDragged(MouseEvent mouseEvent, float mx, float my, float dx, float dy)
UIEventHandler
onMouseDragged
in class UIInputBox
mouseEvent
- Mouse eventmx
- x-coordinatemy
- y-coordinatedx
- movement in xdy
- movement in yLX library by Mark C. Slee. © 2012-2020