Record Class WidgetProperties<T>
java.lang.Object
java.lang.Record
org.moddingx.libx.config.gui.WidgetProperties<T>
- Record Components:
x- The x coordinate to be used for the widget.y- The y coordinate to be used for the widget.width- The width available for the widget.height- The height available for the widget.inputChanged- A consumer that should be called with the new value whenever the input changes.
public record WidgetProperties<T>(int x, int y, int width, int height, Consumer<T> inputChanged)
extends Record
Properties for a widget created by a
ConfigEditor.-
Constructor Summary
ConstructorsConstructorDescriptionWidgetProperties(int x, int y, int width, int height, Consumer<T> inputChanged) Creates an instance of aWidgetPropertiesrecord class. -
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.intheight()Returns the value of theheightrecord component.Returns the value of theinputChangedrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
WidgetProperties
Creates an instance of aWidgetPropertiesrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentinputChanged- the value for theinputChangedrecord 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. -
x
-
y
-
width
-
height
-
inputChanged
Returns the value of theinputChangedrecord component.- Returns:
- the value of the
inputChangedrecord component
-