Record Class TextlikeComponent.TextEditorState
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.designer.util.TextlikeComponent.TextEditorState
- Record Components:
text- the full editor text.caretOffset- the caret position, in characters from the start of the text.selectedText- the currently selected substring, ornullif no selection is active.
- Enclosing class:
TextlikeComponent
-
Constructor Summary
ConstructorsConstructorDescriptionTextEditorState(String text, int caretOffset, @Nullable String selectedText) Creates an instance of aTextEditorStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecaretOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theselectedTextrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextEditorState
Creates an instance of aTextEditorStaterecord class.- Parameters:
text- the value for thetextrecord componentcaretOffset- the value for thecaretOffsetrecord componentselectedText- the value for theselectedTextrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
text
-
caretOffset
public int caretOffset()Returns the value of thecaretOffsetrecord component.- Returns:
- the value of the
caretOffsetrecord component
-
selectedText
Returns the value of theselectedTextrecord component.- Returns:
- the value of the
selectedTextrecord component
-