Class SearchField
-
- All Implemented Interfaces:
-
kotlin.Cloneable,org.polyfrost.polyui.component.Focusable
public final class SearchField extends TextInput
Search field in PolyUI.
- Since:
0.22.0
-
-
Field Summary
Fields Modifier and Type Field Description private final SearchFieldPropertiespropertiesprivate ArrayList<Object>inputprivate final List<Object>outputprivate Stringqueryprivate transient Texttextprivate Stringtxtprivate final transient Booleanfocusedprivate final Stringselectionprivate final transient Booleanerroredprivate transient StringlastValidprivate final Translator.Textplaceholderprivate transient PolyColor.Animatedcolorprivate transient Drawableparentprivate transient Layoutlayoutprivate transient BooleanconsumesHoverprivate Booleandisabledprivate Vec2<Unit>sizeprivate final transient HashMap<Event, Function2<Drawable, Event, Boolean>>eventHandlersprivate transient StringsimpleNameprivate transient Rendererrendererprivate transient PolyUIpolyUIprivate BooleanacceptsInputprivate final transient ByteinitStageprivate final transient BooleanmouseOverprivate Booleanrendersprivate Floatxprivate Floatyprivate Floatwidthprivate Floatheightprivate Booleanexistsprivate transient FloattrueXprivate transient FloattrueYprivate final Unit.TypeatTypeprivate final Unit.TypesizeTypeprivate final BooleanisDynamicprivate Doublerotationprivate DoubleskewXprivate DoubleskewYprivate FloatscaleXprivate FloatscaleYprivate Floatalphaprivate transient Floatacxprivate transient Floatacyprivate final Vec2<Unit>atprivate final BooleanrawResize
-
Constructor Summary
Constructors Constructor Description SearchField(SearchFieldProperties properties, Vec2<Unit> at, Vec2<Unit> size, PolyImage image, Unit fontSize, List<Object> input, List<Object> output, Function1<EventDSL<SearchField>, Unit> events)
-
Method Summary
Modifier and Type Method Description SearchFieldPropertiesgetProperties()final ArrayList<Object>getInput()final UnitsetInput(ArrayList<Object> input)final List<Object>getOutput()final StringgetQuery()final UnitsetQuery(String query)Booleanaccept(Event event)called when this drawable receives an event. -
Methods inherited from class org.polyfrost.polyui.component.impl.TextInput
accept, back, calculateBounds, calculateSize, caretPos, clearSelection, dropToLastSpace, forward, getErrored, getFocused, getLastValid, getPlaceholder, getSelection, getText, getTxt, onColorsChanged, onInitComplete, preRender, render, rescale, reset, selectWordAroundCaret, setLastValid, setText, setTxt, setup, toLastSpace, toNextSpace -
Methods inherited from class org.polyfrost.polyui.component.Component
addKeyframes, addOperation, canBeRemoved, debugRender, draggable, every, getColor, getConsumesHover, getDisabled, getLayout, getParent, getSize, onFontsChanged, recolor, setColor, setConsumesHover, setDisabled, setLayout, setParent, setProperties, setSize, toString, trueX, trueY, wantRedraw -
Methods inherited from class org.polyfrost.polyui.component.Drawable
addEventHandler, addEventhandler, animateBy, animateTo, clone, debugPrint, doDynamicSize, events, fadeBy, fadeTo, getAcceptsInput, getAcx, getAcy, getAlpha, getAt, getAtType, getContainingLayout, getEventHandlers, getExists, getHeight, getInitStage, getMouseOver, getPolyUI, getRawResize, getRenderer, getRenders, getRotation, getScaleX, getScaleY, getSimpleName, getSizeType, getSkewX, getSkewY, getTrueX, getTrueY, getWidth, getX, getY, intersects, isDynamic, isInside, isInside, moveBy, moveTo, onParentInitComplete, postRender, removeOperation, resize, rotateBy, rotateTo, scaleBy, scaleTo, setAcceptsInput, setAcx, setAcy, setAlpha, setExists, setHeight, setPolyUI, setRenderer, setRenders, setRotation, setScaleX, setScaleY, setSimpleName, setSkewX, setSkewY, setTrueX, setTrueY, setWidth, setX, setY, skewBy, skewTo -
Methods inherited from class org.polyfrost.polyui.component.Focusable
accept -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SearchField
SearchField(SearchFieldProperties properties, Vec2<Unit> at, Vec2<Unit> size, PolyImage image, Unit fontSize, List<Object> input, List<Object> output, Function1<EventDSL<SearchField>, Unit> events)
- Parameters:
input- the list of objects to search through.output- the output of the search, where you can pass a list reference.
-
-
Method Detail
-
getProperties
SearchFieldProperties getProperties()
-
-
-
-