Package org.gnome.adw
Class TimedAnimation.Builder<B extends TimedAnimation.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.adw.Animation.Builder<B>
org.gnome.adw.TimedAnimation.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
TimedAnimation
public static class TimedAnimation.Builder<B extends TimedAnimation.Builder<B>>
extends Animation.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theTimedAnimation
object.setAlternate
(boolean alternate) Whether the animation changes direction on every iteration.setDuration
(int duration) Duration of the animation, in milliseconds.Easing function used in the animation.setRepeatCount
(int repeatCount) Number of times the animation will play.setReverse
(boolean reverse) Whether the animation plays backwards.setValueFrom
(double valueFrom) The value to animate from.setValueTo
(double valueTo) The value to animate to.Methods inherited from class org.gnome.adw.Animation.Builder
onDone, setFollowEnableAnimationsSetting, setTarget, setWidget
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 theTimedAnimation
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 toTimedAnimation
.- Overrides:
build
in classAnimation.Builder<B extends TimedAnimation.Builder<B>>
- Returns:
- a new instance of
TimedAnimation
with the properties that were set in the Builder object.
-
setAlternate
Whether the animation changes direction on every iteration.- Parameters:
alternate
- the value for thealternate
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDuration
Duration of the animation, in milliseconds.Describes how much time the animation will take.
If the animation repeats more than once, describes the duration of one iteration.
- Parameters:
duration
- the value for theduration
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEasing
Easing function used in the animation.Describes the curve the value is interpolated on.
See
Easing
for the description of specific easing functions.- Parameters:
easing
- the value for theeasing
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRepeatCount
Number of times the animation will play.If set to 0, the animation will repeat endlessly.
- Parameters:
repeatCount
- the value for therepeat-count
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setReverse
Whether the animation plays backwards.- Parameters:
reverse
- the value for thereverse
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setValueFrom
The value to animate from.The animation will start at this value and end at
TimedAnimation:value-to
.If
TimedAnimation:reverse
isTRUE
, the animation will end at this value instead.- Parameters:
valueFrom
- the value for thevalue-from
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setValueTo
The value to animate to.The animation will start at
TimedAnimation:value-from
and end at this value.If
TimedAnimation:reverse
isTRUE
, the animation will start at this value instead.- Parameters:
valueTo
- the value for thevalue-to
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-