Package org.gnome.adw
Class SwipeTracker.Builder<B extends SwipeTracker.Builder<B>>
java.lang.Object
org.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:
Orientable.Builder<B>,BuilderInterface
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSwipeTrackerobject.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
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientation
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theSwipeTrackerobject. 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:
buildin classGObject.Builder<B extends SwipeTracker.Builder<B>>- Returns:
- a new instance of
SwipeTrackerwith 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-swipesproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setAllowMouseDrag
Whether to allow dragging with mouse pointer.- Parameters:
allowMouseDrag- the value for theallow-mouse-dragproperty- Returns:
- the
Builderinstance 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-handleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.5
-
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 theenabledproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLowerOvershoot
Whether to allow swiping past the first available snap point.- Parameters:
lowerOvershoot- the value for thelower-overshootproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
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 thereversedproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSwipeable
-
setUpperOvershoot
Whether to allow swiping past the last available snap point.- Parameters:
upperOvershoot- the value for theupper-overshootproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
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
Builderinstance 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
towith an animation usingvelocityas the initial velocity, provided in pixels per second.SpringAnimationis usually a good fit for this.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onPrepare
This signal is emitted when a possible swipe is detected.The
directionvalue can be used to restrict the swipe to a certain direction.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-