Class TextInput
-
-
Field Summary
-
Method Summary
Modifier and Type Method Description final StringgetSelection()final StringgetPlaceholder()final UnitsetPlaceholder(String placeholder)Booleanaccept(Event event)called when this drawable receives an event. final Booleanaccept(Event.Focused event)final UnitdropToLastSpace()final UnitmouseInput(Float mouseX, Float mouseY)final UnitselectWordAroundCaret()final UnitmoveLine(Boolean down)final UnittoLastSpace()final UnittoNextSpace()final Unitback()final Unitforward()final UnitclearSelection()Booleansetup(PolyUI polyUI)give this a PolyUI reference. UnitupdateTextBounds(Renderer renderer)StringdebugString()Override this function to add things to the debug display of this drawable. -
Methods inherited from class org.polyfrost.polyui.component.impl.Text
calculateSize, getFont, getFontSize, getFontWeight, getItalic, getStrikethrough, getText, getUFontSize, getUnderline, get_font, get_translated, rescale, setFont, setFontSize, setFontWeight, setItalic, setStrikethrough, setText, setUFontSize, setUnderline, set_font, set_translated -
Methods inherited from class org.polyfrost.polyui.component.Drawable
addChild, addChild, addEventhandler, addOperation, addOperation, at, at, canBeRemoved, clipChildren, clone, debugDraw, draw, get, get, get, getAcceptsInput, getAlignment, getAlpha, getAtValid, getChildren, getColor, getEnabled, getFocusable, getFocused, getFramebuffer, getHasVisibleSize, getHeight, getInputState, getNeedsRedraw, getOperating, getPadding, getPalette, getParent, getPolyUI, getRawResize, getRenderer, getRenders, getRotation, getScaleX, getScaleY, getScrolling, getSimpleName, getSize, getSizeValid, getSkewX, getSkewY, getVisibleSize, getWidth, getX, getY, get_color, get_parent, get_x, get_y, hasListenersFor, hasListenersFor, intersects, isInitialized, isInside, on, recalculate, removeChild, removeChild, removeOperation, repositionChildren, resetScroll, set, set, setAcceptsInput, setAlpha, setColor, setEnabled, setHeight, setInputState, setNeedsRedraw, setPadding, setPalette, setRawResize, setRenders, setRotation, setScaleX, setScaleY, setSimpleName, setSkewX, setSkewY, setVisibleSize, setWidth, setX, setY, set_color, set_x, set_y, toString, tryMakeScrolling -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getSelection
final String getSelection()
-
getPlaceholder
final String getPlaceholder()
-
setPlaceholder
final Unit setPlaceholder(String placeholder)
-
accept
Boolean accept(Event event)
called when this drawable receives an event.
- Returns:
true if the event should be consumed (cancelled so no more handlers are called), false otherwise.
-
accept
final Boolean accept(Event.Focused event)
-
dropToLastSpace
final Unit dropToLastSpace()
-
mouseInput
final Unit mouseInput(Float mouseX, Float mouseY)
-
selectWordAroundCaret
final Unit selectWordAroundCaret()
-
toLastSpace
final Unit toLastSpace()
-
toNextSpace
final Unit toNextSpace()
-
clearSelection
final Unit clearSelection()
-
setup
Boolean setup(PolyUI polyUI)
give this a PolyUI reference.
You can also use this method to do some calculations (such as text widths) that are not dependent on other sizes, or operations that require access to PolyUI things, like PolyUI.settings or PolyUI.translator
this method is called once, and only once.
-
updateTextBounds
Unit updateTextBounds(Renderer renderer)
-
debugString
String debugString()
Override this function to add things to the debug display of this drawable.
- Since:
1.1.1
-
-
-
-