Record Class AttributedText
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.designer.mvvm.binders.swing.AttributedText
- Record Components:
text- The text to be displayedattributes- The attributes to be applied to segments of the texttimestamp- The time when the text was last modified. This is optional, and can be null.
public record AttributedText(String text, List<AttributeSpan> attributes, @Nullable LocalDateTime timestamp)
extends Record
The
text can have multiple segments with different attributes applied to them. Those
segments are defined by the attributes list which specifies what attributes should be
applied to what segments of the text using AttributeSpans.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttributedText(String text, List<AttributeSpan> attributes) AttributedText(String text, List<AttributeSpan> attributes, @Nullable LocalDateTime timestamp) Creates an instance of aAttributedTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.text()Returns the value of thetextrecord component.@Nullable LocalDateTimeReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
AttributedText
-
AttributedText
public AttributedText(String text, List<AttributeSpan> attributes, @Nullable LocalDateTime timestamp) Creates an instance of aAttributedTextrecord class.- Parameters:
text- the value for thetextrecord componentattributes- the value for theattributesrecord componenttimestamp- the value for thetimestamprecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
text
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
timestamp
-