Class Animation.Builder<B extends 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

public static class Animation.Builder<B extends Animation.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Animation build()
      Finish building the Animation object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Animation.
      Overrides:
      build in class GObject.Builder<B extends Animation.Builder<B>>
      Returns:
      a new instance of Animation with the properties that were set in the Builder object.
    • setFollowEnableAnimationsSetting

      public B setFollowEnableAnimationsSetting(boolean followEnableAnimationsSetting)

      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 the follow-enable-animations-setting property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setTarget

      public B setTarget(AnimationTarget target)
      The target to animate.
      Parameters:
      target - the value for the target property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setWidget

      public B setWidget(Widget widget)

      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 the widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDone

      public B onDone(Animation.DoneCallback handler)
      This signal is emitted when the animation has been completed, either on its own or via calling Animation.skip().
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: