Record Class Box.TextBox
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.internal.layout.Box.TextBox
- All Implemented Interfaces:
Box
- Enclosing interface:
Box
public static record Box.TextBox(double x, double baseline, TextMeasurer.FontHandle font, double size, ReportColor color, boolean oblique, String text)
extends Record
implements Box
一段文字;
baseline 為基線的 y-
Nested Class Summary
Nested classes/interfaces inherited from interface Box
Box.BorderBox, Box.FigureBox, Box.ImageBox, Box.RectBox, Box.RuleBox, Box.TextBox -
Constructor Summary
ConstructorsConstructorDescriptionTextBox(double x, double baseline, TextMeasurer.FontHandle font, double size, ReportColor color, boolean oblique, String text) Creates an instance of aTextBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebaseline()Returns the value of thebaselinerecord component.color()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.font()Returns the value of thefontrecord component.final inthashCode()Returns a hash code value for this object.booleanoblique()Returns the value of theobliquerecord component.doublesize()Returns the value of thesizerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.
-
Constructor Details
-
TextBox
public TextBox(double x, double baseline, TextMeasurer.FontHandle font, double size, ReportColor color, boolean oblique, String text) Creates an instance of aTextBoxrecord class.- Parameters:
x- the value for thexrecord componentbaseline- the value for thebaselinerecord componentfont- the value for thefontrecord componentsize- the value for thesizerecord componentcolor- the value for thecolorrecord componentoblique- the value for theobliquerecord componenttext- the value for thetextrecord 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. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
baseline
public double baseline()Returns the value of thebaselinerecord component.- Returns:
- the value of the
baselinerecord component
-
font
Returns the value of thefontrecord component.- Returns:
- the value of the
fontrecord component
-
size
public double size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
oblique
public boolean oblique()Returns the value of theobliquerecord component.- Returns:
- the value of the
obliquerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-