Package limn.components
Class SearchField
java.lang.Object
limn.scene.Widget
limn.components.TextField
limn.components.SearchField
A
TextField preset for search: a leading magnifier icon inside the
field and a trailing coupled clear button (the ComboBox-caret idiom). Enter
fires onSubmit; the clear button empties the field.-
Nested Class Summary
Nested classes/interfaces inherited from class limn.components.TextField
TextField.Validation -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionA field with a search icon, a clear button and a localized placeholder. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Empties the field (and notifies onChange), as the trailing button does.protected voidonKeyEvent(KeyEvent event) Key events (focused widget first, then ancestors).Fires with the current query when Enter is pressed.Methods inherited from class limn.components.TextField
acceptsTextInput, allowClipboardCopy, allowsWordJumps, baselineOffset, caretRect, composingText, fireChange, insertText, invalidateDisplayLine, model, onChange, onCharTyped, onFocusGained, onFocusLost, onMeasure, onMouseEvent, onPaint, onPreedit, paintDisplayText, placeholder, setError, setLeadingIcon, setLeadingIcon, setPlaceholder, setPlaceholder, setPreferredWidth, setText, setTrailingButton, setTrailingButton, setValidation, shapeDisplay, showContextMenu, showContextMenuForFocus, text, validationMethods inherited from class limn.scene.Widget
add, baselineOffsetOf, children, clipboard, clipsChildren, controlSize, cursor, declaredControlSize, declaredLayoutDirection, declaredLocale, focusArrivedByTraversal, height, hitTest, imageCursor, invalidate, invalidate, isEnabled, isFocusable, isFocused, isShowing, isVisible, layoutBox, layoutDirection, locale, localToSceneX, localToSceneY, markNeedsContainedLayout, markNeedsLayout, measure, moveChild, neutralBase, onAttached, onDetached, onFileDrop, onLayout, onPaintOverlay, overlayPassesPointer, paintChildren, paintOutset, paintWidget, parent, remove, requestFocus, revealInView, scene, sceneToLocalX, sceneToLocalY, setControlSize, setCursor, setEnabled, setFocusable, setImageCursor, setInheritanceHost, setLayoutDirection, setLocale, setTooltip, setTooltip, setVisible, shapeText, textRuler, tooltip, width, x, y
-
Constructor Details
-
SearchField
public SearchField()A field with a search icon, a clear button and a localized placeholder.
-
-
Method Details
-
onSubmit
Fires with the current query when Enter is pressed. -
clear
public void clear()Empties the field (and notifies onChange), as the trailing button does. -
onKeyEvent
Description copied from class:WidgetKey events (focused widget first, then ancestors).- Overrides:
onKeyEventin classTextField
-