Record Class DialogInput.NumberRange
java.lang.Object
java.lang.Record
fr.fidorial.dialog.DialogInput.NumberRange
- Record Components:
key- the identifier the value is sent underlabel- the label displayed to the left of the sliderlabelFormat- the translation key building the label, taking the label and the current value as argumentswidth- the width of the slider, between 1 and 1024start- the lowest value of the sliderend- the highest value of the sliderstep- the increment between two accepted values, ornullto accept any value in the rangeinitial- the value the slider starts on, ornullfor the middle of the range
- All Implemented Interfaces:
DialogInput
- Enclosing interface:
DialogInput
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DialogInput
DialogInput.Bool, DialogInput.NumberRange, DialogInput.SingleOption, DialogInput.Text -
Field Summary
FieldsFields inherited from interface DialogInput
DEFAULT_WIDTH, MAX_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.initial()Returns the value of theinitialrecord component.key()Returns the value of thekeyrecord component.label()Returns the value of thelabelrecord component.Returns the value of thelabelFormatrecord component.floatstart()Returns the value of thestartrecord component.step()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
DEFAULT_LABEL_FORMAT
Default value oflabelFormat().- Since:
- 0.1.0
- See Also:
-
-
Constructor Details
-
NumberRange
public NumberRange(String key, Component label, String labelFormat, int width, float start, float end, @Nullable Float step, @Nullable Float initial) Creates an instance of aNumberRangerecord class.- Parameters:
key- the value for thekeyrecord componentlabel- the value for thelabelrecord componentlabelFormat- the value for thelabelFormatrecord componentwidth- the value for thewidthrecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentstep- the value for thesteprecord componentinitial- the value for theinitialrecord 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. -
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
-
labelFormat
Returns the value of thelabelFormatrecord component.- Returns:
- the value of the
labelFormatrecord component
-
width
-
start
-
end
-
step
-
initial
-