Package org.gnome.adw
Class Animation.Builder<B extends Animation.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.adw.Animation.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
SpringAnimation.Builder
,TimedAnimation.Builder
- Enclosing class:
Animation
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theAnimation
object.onDone
(Animation.DoneCallback handler) This signal is emitted when the animation has been completed, either on its own or via callingAnimation.skip()
.setFollowEnableAnimationsSetting
(boolean followEnableAnimationsSetting) Whether to skip the animation when animations are globally disabled.setTarget
(AnimationTarget target) The target to animate.The animation widget.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
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theAnimation
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 toAnimation
.- Overrides:
build
in classGObject.Builder<B extends Animation.Builder<B>>
- Returns:
- a new instance of
Animation
with the properties that were set in the Builder object.
-
setFollowEnableAnimationsSetting
Whether to skip the animation when animations are globally disabled.The default behavior is to skip the animation. Set to
FALSE
to disable this behavior.This can be useful for cases where animation is essential, like spinners, or in demo applications. Most other animations should keep it enabled.
See
Gtk.Settings:gtk-enable-animations
.- Parameters:
followEnableAnimationsSetting
- the value for thefollow-enable-animations-setting
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTarget
The target to animate.- Parameters:
target
- the value for thetarget
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWidget
The animation widget.It provides the frame clock for the animation. It's not strictly necessary for this widget to be same as the one being animated.
The widget must be mapped in order for the animation to work. If it's not mapped, or if it gets unmapped during an ongoing animation, the animation will be automatically skipped.
- Parameters:
widget
- the value for thewidget
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onDone
This signal is emitted when the animation has been completed, either on its own or via callingAnimation.skip()
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-