Record Class DialogBody.PlainMessage
java.lang.Object
java.lang.Record
fr.fidorial.dialog.DialogBody.PlainMessage
- Record Components:
contents- the text to displaywidth- the maximum width of the message, between 1 and 1024
- All Implemented Interfaces:
DialogBody
- Enclosing interface:
DialogBody
public static record DialogBody.PlainMessage(Component contents, int width)
extends Record
implements DialogBody
A multiline label.
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface DialogBody
DialogBody.Item, DialogBody.PlainMessage -
Field Summary
Fields inherited from interface DialogBody
DEFAULT_WIDTH, MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionPlainMessage(Component contents, int width) Creates an instance of aPlainMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
PlainMessage
-
-
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. -
contents
-
width
-