public class UIIntegerBox extends UINumberBox implements UIControlTarget
UIInputBox.FillStyle, UIInputBox.ProgressIndicator
UIContextActions.Action
Modifier and Type | Field and Description |
---|---|
protected int |
editMultiplier |
protected DiscreteParameter |
parameter |
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 |
---|
UIIntegerBox() |
UIIntegerBox(float w,
DiscreteParameter parameter) |
UIIntegerBox(float w,
float h,
DiscreteParameter parameter) |
UIIntegerBox(float x,
float y,
float w,
float h) |
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() |
LXParameter |
getParameter() |
int |
getValue() |
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) |
protected void |
onValueChange(int value)
Subclasses may override to handle value changes
|
protected void |
saveEditBuffer() |
UIIntegerBox |
setEditMultiplier(int editMultiplier) |
UIIntegerBox |
setParameter(DiscreteParameter parameter) |
UIIntegerBox |
setRange(int minValue,
int maxValue) |
UIIntegerBox |
setValue(int value) |
protected UIIntegerBox |
setValue(int value,
boolean pushToParameter) |
setFill, setFillColor, setFillStyle, setShiftMultiplier
edit, enableImmediateEdit, enableMousePressEdit, enableReturnKeyEdit, getEditBufferValue, isEditable, isEnabled, onBlur, onDraw, onKeyPressed, onMouseDragged, 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
protected DiscreteParameter parameter
protected int editMultiplier
public UIIntegerBox()
public UIIntegerBox(float x, float y, float w, float h)
public UIIntegerBox(float w, DiscreteParameter parameter)
public UIIntegerBox(float w, float h, DiscreteParameter parameter)
public String getDescription()
UIObject
getDescription
in class UIObject
public LXParameter getParameter()
getParameter
in class UIParameterComponent
public UIIntegerBox setParameter(DiscreteParameter parameter)
public UIIntegerBox setRange(int minValue, int maxValue)
public UIIntegerBox setEditMultiplier(int editMultiplier)
protected double getFillWidthNormalized()
getFillWidthNormalized
in class UIInputBox
public int getValue()
public String getValueString()
getValueString
in class UIInputBox
public UIIntegerBox setValue(int value)
protected UIIntegerBox setValue(int value, boolean pushToParameter)
protected void onValueChange(int value)
value
- New value being setprotected void saveEditBuffer()
saveEditBuffer
in class UIInputBox
protected boolean isValidCharacter(char keyChar)
isValidCharacter
in class UIInputBox
protected void incrementValue(KeyEvent keyEvent)
UIInputBox
incrementValue
in class UIInputBox
keyEvent
- Key eventprotected void decrementValue(KeyEvent keyEvent)
UIInputBox
decrementValue
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
LX library by Mark C. Slee. © 2012-2020