Record Class DecisionFigure.Text
java.lang.Object
java.lang.Record
network.ike.docs.koncept.DecisionFigure.Text
- All Implemented Interfaces:
DecisionFigure.Mark
- Enclosing class:
DecisionFigure
public static record DecisionFigure.Text(double x, double top, String text, double size, boolean bold, boolean italic, String colour, String role)
extends Record
implements DecisionFigure.Mark
A run of text whose top-left corner is at
(x, top): the writers set the baseline
from the size, so a label sits where the builder put its box.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbold()Returns the value of theboldrecord component.colour()Returns the value of thecolourrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanitalic()Returns the value of theitalicrecord component.role()Returns the value of therolerecord component.doublesize()Returns the value of thesizerecord component.text()Returns the value of thetextrecord component.doubletop()Returns the value of thetoprecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.
-
Constructor Details
-
Text
public Text(double x, double top, String text, double size, boolean bold, boolean italic, String colour, String role) Creates an instance of aTextrecord class.- Parameters:
x- the value for thexrecord componenttop- the value for thetoprecord componenttext- the value for thetextrecord componentsize- the value for thesizerecord componentbold- the value for theboldrecord componentitalic- the value for theitalicrecord componentcolour- the value for thecolourrecord componentrole- the value for therolerecord 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
-
top
public double top()Returns the value of thetoprecord component.- Returns:
- the value of the
toprecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
size
public double size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
bold
public boolean bold()Returns the value of theboldrecord component.- Returns:
- the value of the
boldrecord component
-
italic
public boolean italic()Returns the value of theitalicrecord component.- Returns:
- the value of the
italicrecord component
-
colour
Returns the value of thecolourrecord component.- Returns:
- the value of the
colourrecord component
-
role
Returns the value of therolerecord component.- Specified by:
rolein interfaceDecisionFigure.Mark- Returns:
- the value of the
rolerecord component
-