java.lang.Object
io.github.palexdev.virtualizedfx.utils.ScrollUtils
Utility class for VirtualFlows.
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明static ScrollUtils.ScrollDirectiondetermineScrollDirection(Orientation orientation, double delta) Determines the direction of the scroll from the given orientation and the given delta, usesupOrDown(double)if orientation is VERTICAL orleftOrRight(double)if orientation is HORIZONTAL.static booleanisTrackPad(double delta) Determines if a scroll event comes from the trackpad from the given delta value.static ScrollUtils.ScrollDirectionleftOrRight(double delta) If the given delta is lesser than 0 returns LEFT, otherwise returns RIGHT.static ScrollUtils.ScrollDirectionupOrDown(double delta) If the given delta is lesser than 0 returns DOWN, otherwise returns UP.
-
方法详细资料
-
isTrackPad
public static boolean isTrackPad(double delta) Determines if a scroll event comes from the trackpad from the given delta value. There's no real way to distinguish a scroll event from trackpad or mouse but usually all trackpad events have a much lower delta value. -
determineScrollDirection
public static ScrollUtils.ScrollDirection determineScrollDirection(Orientation orientation, double delta) Determines the direction of the scroll from the given orientation and the given delta, usesupOrDown(double)if orientation is VERTICAL orleftOrRight(double)if orientation is HORIZONTAL. -
leftOrRight
If the given delta is lesser than 0 returns LEFT, otherwise returns RIGHT. -
upOrDown
If the given delta is lesser than 0 returns DOWN, otherwise returns UP.
-