Class TimedAnimation
- All Implemented Interfaces:
Proxy
Animation.
AdwTimedAnimation implements a simple animation interpolating the given
value from TimedAnimation:value-from to
TimedAnimation:value-to over
TimedAnimation:duration milliseconds using the curve described by
TimedAnimation:easing.
If TimedAnimation:reverse is set to TRUE, AdwTimedAnimation
will instead animate from TimedAnimation:value-to to
TimedAnimation:value-from, and the easing curve will be inverted.
The animation can repeat a certain amount of times, or endlessly, depending
on the TimedAnimation:repeat-count value. If
TimedAnimation:alternate is set to TRUE, it will also change the
direction every other iteration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTimedAnimation.Builder<B extends TimedAnimation.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.adw.Animation
Animation.Animation$Impl, Animation.AnimationClass, Animation.DoneCallbackNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TimedAnimation.TimedAnimation(MemorySegment address) Create a TimedAnimation proxy instance for the provided memory address.TimedAnimation(Widget widget, double from, double to, int duration, AnimationTarget target) Creates a newAdwTimedAnimationonwidgetto animatetargetfromfromtoto. -
Method Summary
Modifier and TypeMethodDescriptionprotected TimedAnimationasParent()Returns this instance as if it were its parent type.static TimedAnimation.Builder<? extends TimedAnimation.Builder> builder()ATimedAnimation.Builderobject constructs aTimedAnimationwith the specified properties.booleanGets whether this TimedAnimation changes direction on every iteration.intGets the duration ofself.Gets the easing function this TimedAnimation uses.intGets the number of times this TimedAnimation will play.booleanGets whether this TimedAnimation plays backwards.static @Nullable TypegetType()Get the GType of the TimedAnimation classdoubleGets the value this TimedAnimation will animate from.doubleGets the value this TimedAnimation will animate to.voidsetAlternate(boolean alternate) Sets whether this TimedAnimation changes direction on every iteration.voidsetDuration(int duration) Sets the duration ofself.voidSets the easing function this TimedAnimation will use.voidsetRepeatCount(int repeatCount) Sets the number of times this TimedAnimation will play.voidsetReverse(boolean reverse) Sets whether this TimedAnimation plays backwards.voidsetValueFrom(double value) Sets the value this TimedAnimation will animate from.voidsetValueTo(double value) Sets the value this TimedAnimation will animate to.Methods inherited from class org.gnome.adw.Animation
emitDone, getFollowEnableAnimationsSetting, getMemoryLayout, getState, getTarget, getValue, getWidget, onDone, pause, play, reset, resume, setFollowEnableAnimationsSetting, setTarget, skipMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TimedAnimation
Create a TimedAnimation proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TimedAnimation
Creates a newAdwTimedAnimationonwidgetto animatetargetfromfromtoto.- Parameters:
widget- a widget to create animation onfrom- a value to animate fromto- a value to animate toduration- a duration for the animationtarget- a target value to animate
-
TimedAnimation
public TimedAnimation()Creates a new TimedAnimation.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getAlternate
public boolean getAlternate()Gets whether this TimedAnimation changes direction on every iteration.- Returns:
- whether this TimedAnimation alternates
-
getDuration
public int getDuration()Gets the duration ofself.- Returns:
- the duration of
self,in milliseconds
-
getEasing
Gets the easing function this TimedAnimation uses.- Returns:
- the easing function this TimedAnimation uses
-
getRepeatCount
public int getRepeatCount()Gets the number of times this TimedAnimation will play.- Returns:
- the number of times this TimedAnimation will play
-
getReverse
public boolean getReverse()Gets whether this TimedAnimation plays backwards.- Returns:
- whether this TimedAnimation plays backwards
-
getValueFrom
public double getValueFrom()Gets the value this TimedAnimation will animate from.- Returns:
- the value to animate from
-
getValueTo
public double getValueTo()Gets the value this TimedAnimation will animate to.- Returns:
- the value to animate to
-
setAlternate
public void setAlternate(boolean alternate) Sets whether this TimedAnimation changes direction on every iteration.- Parameters:
alternate- whether this TimedAnimation alternates
-
setDuration
public void setDuration(int duration) Sets the duration ofself.If the animation repeats more than once, sets the duration of one iteration.
- Parameters:
duration- the duration to use, in milliseconds
-
setEasing
Sets the easing function this TimedAnimation will use.See
Easingfor the description of specific easing functions.- Parameters:
easing- the easing function to use
-
setRepeatCount
public void setRepeatCount(int repeatCount) Sets the number of times this TimedAnimation will play.If set to 0, this TimedAnimation will repeat endlessly.
- Parameters:
repeatCount- the number of times this TimedAnimation will play
-
setReverse
public void setReverse(boolean reverse) Sets whether this TimedAnimation plays backwards.- Parameters:
reverse- whether this TimedAnimation plays backwards
-
setValueFrom
public void setValueFrom(double value) Sets the value this TimedAnimation will animate from.The animation will start at this value and end at
TimedAnimation:value-to.If
TimedAnimation:reverseisTRUE, the animation will end at this value instead.- Parameters:
value- the value to animate from
-
setValueTo
public void setValueTo(double value) Sets the value this TimedAnimation will animate to.The animation will start at
TimedAnimation:value-fromand end at this value.If
TimedAnimation:reverseisTRUE, the animation will start at this value instead.- Parameters:
value- the value to animate to
-
builder
ATimedAnimation.Builderobject constructs aTimedAnimationwith the specified properties. Use the variousset...()methods to set properties, and finish construction withTimedAnimation.Builder.build().- Returns:
- the builder object
-