Package heronarts.glx.ui.component
Class UITextBox
- All Implemented Interfaces:
UIContextActions,UICopy,UIFocus,UIKeyFocus,UIMouseFocus,UIPaste,UITabFocus,LXLoopTask
- Direct Known Subclasses:
UIFileNameBox
-
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.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
ConstructorsConstructorDescriptionUITextBox(float w, float h) UITextBox(float x, float y, float w, float h) UITextBox(float x, float y, float w, float h, StringParameter parameter) UITextBox(float w, float h, StringParameter parameter) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()voidfocusKeyPress(KeyEvent keyEvent, char keyChar, int keyCode) Gives the text box focus and processes the key event which just occurred which would give it focusObjects are encouraged to override this method providing a helpful String displayed to the user explaining the function of this UI component.protected StringgetValue()protected StringbooleanisValidCharacter(char keyChar) static booleanisValidTextCharacter(char keyChar) onCopy()protected voidonMousePressed(MouseEvent mouseEvent, float mx, float my) Subclasses override to receive mouse eventsvoidonPaste(LXClipboardItem item) protected voidonValueChange(String value) Subclasses may override to handle value changesprotected voidsaveEditBuffer(String editBuffer) setEmptyValueAllowed(boolean isEmptyValueAllowed) setParameter(StringParameter parameter) setValidCharacters(String validCharacters) Set a custom list of valid characters for this text boxMethods inherited from class heronarts.glx.ui.component.UIInputBox
decrementValue, disableImmediateAppend, disableImmediateEdit, disableReturnKeyEdit, edit, edit, editAppend, enableImmediateAppend, enableImmediateEdit, enableReturnKeyEdit, getEditBuffer, getEditRange, getFillWidthNormalized, incrementMouseValue, incrementValue, isEditable, isEnabled, onBlur, onDraw, onDrawText, onEditChange, onEditFinished, onKeyPressed, onMouseDragged, onMouseReleased, setEditable, setEnabled, setMouseEditable, setProgressColor, setProgressColor, setProgressColor, setProgressIndicator, setValueCommandMethods inherited from class heronarts.glx.ui.component.UIParameterComponent
getContextActions, 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, drawBorder, 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
-
UITextBox
public UITextBox() -
UITextBox
public UITextBox(float w, float h) -
UITextBox
public UITextBox(float x, float y, float w, float h) -
UITextBox
-
UITextBox
-
-
Method Details
-
getParameter
- Specified by:
getParameterin classUIParameterComponent
-
setParameter
-
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
-
getValue
-
getValueString
- Specified by:
getValueStringin classUIInputBox
-
getInitialEditBufferValue
- Overrides:
getInitialEditBufferValuein classUIInputBox
-
setEmptyValueAllowed
-
setValue
-
setValue
-
onValueChange
Subclasses may override to handle value changes- Parameters:
value- New value being set
-
saveEditBuffer
- Specified by:
saveEditBufferin classUIInputBox
-
setValidCharacters
Set a custom list of valid characters for this text box- Parameters:
validCharacters- Valid characters- Returns:
- this
-
isValidTextCharacter
public static boolean isValidTextCharacter(char keyChar) -
isValidCharacter
public boolean isValidCharacter(char keyChar) - Specified by:
isValidCharacterin classUIInputBox
-
onMousePressed
Description copied from class:UIEventHandlerSubclasses override to receive mouse events- Overrides:
onMousePressedin classUIInputBox- Parameters:
mouseEvent- Mouse eventmx- x-coordinatemy- y-coordinate
-
focusKeyPress
Gives the text box focus and processes the key event which just occurred which would give it focus- Parameters:
keyEvent- Key EventkeyChar- Key characterkeyCode- Key code
-
onCopy
-
onPaste
-
dispose
public void dispose()
-