Package pi.graphics.boxes
Record Class TextBlockBox.TextLayoutLine
java.lang.Object
java.lang.Record
pi.graphics.boxes.TextBlockBox.TextLayoutLine
- Record Components:
layout- Das vom Font-Renderer berechnete Layout der Zeile.lineContent- Der Textinhalt dieser Zeile.parentContent- Der ursprüngliche vollständige Inhalt des Textblocks.startIndex- Der Startindex (inklusive) innerhalb des vollständigen Inhalts.endIndex- Der Endindex (exklusive) innerhalb des vollständigen Inhalts.
- Enclosing class:
- TextBlockBox
public static record TextBlockBox.TextLayoutLine(TextLayout layout, String lineContent, String parentContent, int startIndex, int endIndex)
extends Record
Eine Zeile des Textblocks.
- Since:
- 0.45.0
-
Constructor Summary
ConstructorsConstructorDescriptionTextLayoutLine(TextLayout layout, String lineContent, String parentContent, int startIndex, int endIndex) Creates an instance of aTextLayoutLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintendIndex()Returns the value of theendIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.layout()Returns the value of thelayoutrecord component.Returns the value of thelineContentrecord component.Returns the value of theparentContentrecord component.intReturns the value of thestartIndexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextLayoutLine
public TextLayoutLine(TextLayout layout, String lineContent, String parentContent, int startIndex, int endIndex) Creates an instance of aTextLayoutLinerecord class.- Parameters:
layout- the value for thelayoutrecord componentlineContent- the value for thelineContentrecord componentparentContent- the value for theparentContentrecord componentstartIndex- the value for thestartIndexrecord componentendIndex- the value for theendIndexrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
layout
Returns the value of thelayoutrecord component.- Returns:
- the value of the
layoutrecord component
-
lineContent
Returns the value of thelineContentrecord component.- Returns:
- the value of the
lineContentrecord component
-
parentContent
Returns the value of theparentContentrecord component.- Returns:
- the value of the
parentContentrecord component
-
startIndex
public int startIndex()Returns the value of thestartIndexrecord component.- Returns:
- the value of the
startIndexrecord component
-
endIndex
public int endIndex()Returns the value of theendIndexrecord component.- Returns:
- the value of the
endIndexrecord component
-