Package org.gnome.adw
Class SwipeTracker.Builder<B extends SwipeTracker.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.adw.SwipeTracker.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Orientable.Builder<B>
- Enclosing class:
SwipeTracker
public static class SwipeTracker.Builder<B extends SwipeTracker.Builder<B>>
extends GObject.Builder<B>
implements Orientable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theSwipeTracker
object.This signal is emitted right before a swipe will be started, after the drag threshold has been passed.onEndSwipe
(SwipeTracker.EndSwipeCallback handler) This signal is emitted as soon as the gesture has stopped.onPrepare
(SwipeTracker.PrepareCallback handler) This signal is emitted when a possible swipe is detected.This signal is emitted every time the progress value changes.setAllowLongSwipes
(boolean allowLongSwipes) Whether to allow swiping for more than one snap point at a time.setAllowMouseDrag
(boolean allowMouseDrag) Whether to allow dragging with mouse pointer.setAllowWindowHandle
(boolean allowWindowHandle) Whether to allow touchscreen swiping fromGtkWindowHandle
.setEnabled
(boolean enabled) Whether the swipe tracker is enabled.setLowerOvershoot
(boolean lowerOvershoot) Whether to allow swiping past the first available snap point.setReversed
(boolean reversed) Whether to reverse the swipe direction.setSwipeable
(Swipeable swipeable) The widget the swipe tracker is attached to.setUpperOvershoot
(boolean upperOvershoot) Whether to allow swiping past the last available snap point.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
Methods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientation
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theSwipeTracker
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toSwipeTracker
.- Overrides:
build
in classGObject.Builder<B extends SwipeTracker.Builder<B>>
- Returns:
- a new instance of
SwipeTracker
with the properties that were set in the Builder object.
-
setAllowLongSwipes
Whether to allow swiping for more than one snap point at a time.If the value is
FALSE
, each swipe can only move to the adjacent snap points.- Parameters:
allowLongSwipes
- the value for theallow-long-swipes
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAllowMouseDrag
Whether to allow dragging with mouse pointer.- Parameters:
allowMouseDrag
- the value for theallow-mouse-drag
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAllowWindowHandle
Whether to allow touchscreen swiping fromGtkWindowHandle
.This will make dragging the window impossible.
- Parameters:
allowWindowHandle
- the value for theallow-window-handle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEnabled
Whether the swipe tracker is enabled.When it's not enabled, no events will be processed. Usually widgets will want to expose this via a property.
- Parameters:
enabled
- the value for theenabled
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLowerOvershoot
Whether to allow swiping past the first available snap point.- Parameters:
lowerOvershoot
- the value for thelower-overshoot
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setReversed
Whether to reverse the swipe direction.If the swipe tracker is horizontal, it can be used for supporting RTL text direction.
- Parameters:
reversed
- the value for thereversed
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSwipeable
-
setUpperOvershoot
Whether to allow swiping past the last available snap point.- Parameters:
upperOvershoot
- the value for theupper-overshoot
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onBeginSwipe
This signal is emitted right before a swipe will be started, after the drag threshold has been passed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onEndSwipe
This signal is emitted as soon as the gesture has stopped.The user is expected to animate the deceleration from the current progress value to
to
with an animation usingvelocity
as the initial velocity, provided in pixels per second.SpringAnimation
is usually a good fit for this.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPrepare
This signal is emitted when a possible swipe is detected.The
direction
value can be used to restrict the swipe to a certain direction.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onUpdateSwipe
This signal is emitted every time the progress value changes.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-