Record Class ZoomValue
java.lang.Object
java.lang.Record
org.jjazz.pianoroll.api.ZoomValue
Zoom value for an editor.
hValue and vValue must be in the range [0;100], 50 is default.
-
Constructor Summary
Constructors -
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.inthValue()Returns the value of thehValuerecord component.floathValue as a float.static ZoomValueGet a ZoomValue instance from the specified string.offset(int hDelta, int vDelta) Get a copy with the specified parameters added to the existing hValue and vValue.Save the object as a string.setH(int newHValue) Get a copy of this instance with hValue changed.setV(int newVValue) Get a copy of this instance with vValue changed.final StringtoString()Returns a string representation of this record class.intvValue()Returns the value of thevValuerecord component.floathValue as a float.
-
Constructor Details
-
ZoomValue
public ZoomValue()Create a zoom value with 50 / 50. -
ZoomValue
public ZoomValue(int hValue, int vValue) Creates an instance of aZoomValuerecord class.- Parameters:
hValue- the value for thehValuerecord componentvValue- the value for thevValuerecord component
-
-
Method Details
-
setH
Get a copy of this instance with hValue changed.- Parameters:
newHValue-- Returns:
-
setV
Get a copy of this instance with vValue changed.- Parameters:
newVValue-- Returns:
-
offset
Get a copy with the specified parameters added to the existing hValue and vValue.- Parameters:
hDelta-vDelta-- Returns:
-
hValueFloat
public float hValueFloat()hValue as a float.- Returns:
- [0;1]
-
vValueFloat
public float vValueFloat()hValue as a float.- Returns:
- [0;1]
-
saveAsString
-
loadFromString
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
hValue
public int hValue()Returns the value of thehValuerecord component.- Returns:
- the value of the
hValuerecord component
-
vValue
public int vValue()Returns the value of thevValuerecord component.- Returns:
- the value of the
vValuerecord component
-