Enum Class ScrollUnit
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<ScrollUnit>
,Constable
When you get WHEEL
, a delta of 1.0 means 1 wheel detent
click in the south direction, 2.0 means 2 wheel detent clicks in the south
direction... This is the same logic for negative values but in the north
direction.
If you get SURFACE
, are managing a scrollable view and get a
value of 123, you have to scroll 123 surface logical pixels right if it's
deltaX
or down if it's deltaY
. This is the same logic for negative values
but you have to scroll left instead of right if it's deltaX
and up instead
of down if it's deltaY
.
1 surface logical pixel is equal to 1 real screen pixel multiplied by the final scale factor of your graphical interface (the product of the desktop scale factor and eventually a custom scale factor in your app).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the ScrollUnit classint
getValue()
Get the numeric value of this enumstatic ScrollUnit
of
(int value) Create a new ScrollUnit for the provided valuestatic ScrollUnit
Returns the enum constant of this class with the specified name.static ScrollUnit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WHEEL
The delta is in number of wheel clicks. -
SURFACE
The delta is in surface pixels to scroll directly on screen.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new ScrollUnit for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-