Class Suggestion
java.lang.Object
io.jmix.ui.component.autocomplete.Suggestion
Class for single suggestion for an
Single suggestion has three attributes:
AutoCompleteSupport field.
Single suggestion has three attributes:
- Suggestion value itself. If user selects this suggestion this value will be inserted to text field.
- Display value that is presented inside the suggestion box.
- Cursor positions (start and end) for the replacement.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSuggestion(AutoCompleteSupport component, String displayText, String valueText, String valueSuffix, int startPosition, int endPosition) Create new suggestion. -
Method Summary
Modifier and TypeMethodDescriptionintint
-
Field Details
-
displayText
-
valueText
-
valueSuffix
-
startPosition
protected int startPosition -
endPosition
protected int endPosition
-
-
Constructor Details
-
Suggestion
public Suggestion(AutoCompleteSupport component, String displayText, String valueText, String valueSuffix, int startPosition, int endPosition) Create new suggestion.- Parameters:
displayText- Text to display in the suggestion boxvalueText- Value to be inserted into text field if this suggestion is selected.valueSuffix- The part of the value that is located after the current cursor position. This is used by the client-side filtering method.startPosition- Start position of the replacement. Must be positive and below length of text in textfield. If negative number is given the current cursor position is used.endPosition- End position of the replacement. Must be positive and below length of text in textfield. If negative number is given the current cursor position is used.
-
-
Method Details
-
getValueSuffix
-
getDisplayText
-
getValueText
-
getStartPosition
public int getStartPosition() -
getEndPosition
public int getEndPosition()
-