Record Class NativeUiScroll.Model
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.screen.ui.NativeUiScroll.Model
- Enclosing class:
NativeUiScroll
public static record NativeUiScroll.Model(NativeUiLayout.Box originalThumb, NativeUiLayout.Rect track, NativeUiLayout.Rect thumb, NativeUiLayout.Rect clip, float maximum, float offset, boolean horizontal)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionModel(NativeUiLayout.Box originalThumb, NativeUiLayout.Rect track, NativeUiLayout.Rect thumb, NativeUiLayout.Rect clip, float maximum, float offset, boolean horizontal) Creates an instance of aModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclip()Returns the value of thecliprecord component.booleancontainsThumb(double x, double y) booleancontainsTrack(double x, double y) final booleanIndicates whether some other object is "equal to" this one.floatextent()final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehorizontalrecord component.floatmaximum()Returns the value of themaximumrecord component.floatoffset()Returns the value of theoffsetrecord component.floatoffsetAt(float pointer, float grab) Returns the value of theoriginalThumbrecord component.floatpointer(double x, double y) floatstart()thumb()Returns the value of thethumbrecord component.final StringtoString()Returns a string representation of this record class.track()Returns the value of thetrackrecord component.
-
Constructor Details
-
Model
public Model(NativeUiLayout.Box originalThumb, NativeUiLayout.Rect track, NativeUiLayout.Rect thumb, NativeUiLayout.Rect clip, float maximum, float offset, boolean horizontal) Creates an instance of aModelrecord class.- Parameters:
originalThumb- the value for theoriginalThumbrecord componenttrack- the value for thetrackrecord componentthumb- the value for thethumbrecord componentclip- the value for thecliprecord componentmaximum- the value for themaximumrecord componentoffset- the value for theoffsetrecord componenthorizontal- the value for thehorizontalrecord component
-
-
Method Details
-
containsTrack
public boolean containsTrack(double x, double y) -
containsThumb
public boolean containsThumb(double x, double y) -
pointer
public float pointer(double x, double y) -
start
public float start() -
extent
public float extent() -
offsetAt
public float offsetAt(float pointer, float grab) -
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. -
originalThumb
Returns the value of theoriginalThumbrecord component.- Returns:
- the value of the
originalThumbrecord component
-
track
Returns the value of thetrackrecord component.- Returns:
- the value of the
trackrecord component
-
thumb
Returns the value of thethumbrecord component.- Returns:
- the value of the
thumbrecord component
-
clip
Returns the value of thecliprecord component.- Returns:
- the value of the
cliprecord component
-
maximum
public float maximum()Returns the value of themaximumrecord component.- Returns:
- the value of the
maximumrecord component
-
offset
public float offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
horizontal
public boolean horizontal()Returns the value of thehorizontalrecord component.- Returns:
- the value of the
horizontalrecord component
-