Record Class DialogInput.Bool
java.lang.Object
java.lang.Record
fr.fidorial.dialog.DialogInput.Bool
- Record Components:
key- the identifier the value is sent underlabel- the label displayed to the left of the checkboxinitial- whether the box starts checkedonTrue- the string sent while the box is checkedonFalse- the string sent while the box is unchecked
- All Implemented Interfaces:
DialogInput
- Enclosing interface:
DialogInput
-
Nested Class Summary
Nested classes/interfaces inherited from interface DialogInput
DialogInput.Bool, DialogInput.NumberRange, DialogInput.SingleOption, DialogInput.Text -
Field Summary
Fields inherited from interface DialogInput
DEFAULT_WIDTH, MAX_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleaninitial()Returns the value of theinitialrecord component.initial(boolean initial) key()Returns the value of thekeyrecord component.label()Returns the value of thelabelrecord component.onFalse()Returns the value of theonFalserecord component.onTrue()Returns the value of theonTruerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Bool
Creates an instance of aBoolrecord class.
-
-
Method Details
-
initial
- Parameters:
initial- whether the box starts checked- Returns:
- a copy of this control starting in the given state
- Since:
- 0.1.0
-
values
- Parameters:
onTrue- the string sent while the box is checkedonFalse- the string sent while the box is unchecked- Returns:
- a copy of this control sending the given values
- Since:
- 0.1.0
-
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. -
key
Returns the value of thekeyrecord component.- Specified by:
keyin interfaceDialogInput- Returns:
- the value of the
keyrecord component
-
label
Returns the value of thelabelrecord component.- Specified by:
labelin interfaceDialogInput- Returns:
- the value of the
labelrecord component
-
initial
-
onTrue
-
onFalse
-