Package org.moddingx.libx.config.gui
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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. - 
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. - 
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 '=='. - 
x
public int x()Returns the value of thexrecord component.- Returns:
 - the value of the 
xrecord component 
 - 
y
public int y()Returns the value of theyrecord component.- Returns:
 - the value of the 
yrecord component 
 - 
width
public int width()Returns the value of thewidthrecord component.- Returns:
 - the value of the 
widthrecord component 
 - 
height
public int height()Returns the value of theheightrecord component.- Returns:
 - the value of the 
heightrecord component 
 - 
inputChanged
Returns the value of theinputChangedrecord component.- Returns:
 - the value of the 
inputChangedrecord component 
 
 -