Record Class SliderWidget
java.lang.Object
java.lang.Record
dev.pfaff.altargui.widgets.SliderWidget
-
Field Summary
Fields inherited from interface dev.pfaff.altargui.Widget
EMPTY_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionSliderWidget
(float value, it.unimi.dsi.fastutil.floats.FloatConsumer onChanged) Creates an instance of aSliderWidget
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull WidgetInstance
Instantiates an instance of the widget.it.unimi.dsi.fastutil.floats.FloatConsumer
Returns the value of theonChanged
record component.final String
toString()
Returns a string representation of this record class.float
value()
Returns the value of thevalue
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.pfaff.altargui.Widget
atAbsolutePosition, atAlignment, atCenter, atRelativePosition, expand, expandHeight, expandWidth, withAbsoluteHeight, withAbsoluteSize, withAbsoluteWidth, withAspectRatio, withAspectRatio, withAspectRatio, withBackground, withBackgroundColor, withBackgroundTexture, withBorder, withHorizontalMargin, withHorizontalMargin, withId, withKey, withMargin, withMargin, withMarginBottom, withMarginEnd, withMarginStart, withMarginTop, withMultiChildAttributes, withSymmetricMargin, withTooltip, withVerticalMargin, withVerticalMargin, wrap
-
Constructor Details
-
SliderWidget
public SliderWidget(float value, it.unimi.dsi.fastutil.floats.FloatConsumer onChanged) Creates an instance of aSliderWidget
record class.- Parameters:
value
- the value for thevalue
record componentonChanged
- the value for theonChanged
record component
-
-
Method Details
-
instantiate
Description copied from interface:Widget
Instantiates an instance of the widget.- Specified by:
instantiate
in interfaceWidget
-
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 '=='. -
value
public float value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
onChanged
public it.unimi.dsi.fastutil.floats.FloatConsumer onChanged()Returns the value of theonChanged
record component.- Returns:
- the value of the
onChanged
record component
-