Record Class FormField
java.lang.Object
java.lang.Record
dev.boze.api.gui.editor.FormField
- Record Components:
label- Shown next to the field, or empty to show the field aloneplaceholder- Shown while the field is emptymasked- Whether the text is hidden, as for passwords
public record FormField(String label, TextFieldState field, String placeholder, boolean masked)
extends Record
A text field in a form made with
GuiEditors.form(String, String, String). Read what was typed from
field.-
Constructor Summary
ConstructorsConstructorDescriptionFormField(String label, TextFieldState field, String placeholder) FormField(String label, TextFieldState field, String placeholder, boolean masked) Creates an instance of aFormFieldrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.booleanmasked()Returns the value of themaskedrecord component.Returns the value of theplaceholderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FormField
Creates an instance of aFormFieldrecord class.- Parameters:
label- the value for thelabelrecord componentfield- the value for thefieldrecord componentplaceholder- the value for theplaceholderrecord componentmasked- the value for themaskedrecord component
-
FormField
-
-
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. -
label
-
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
placeholder
Returns the value of theplaceholderrecord component.- Returns:
- the value of the
placeholderrecord component
-
masked
-