Class AnimationStyleBuilder

java.lang.Object
com.massifmaps.styles.AnimationStyleBuilder

public class AnimationStyleBuilder extends Object
A builder for AnimationStyle instances.
  • Constructor Details

    • AnimationStyleBuilder

      public AnimationStyleBuilder()
      Constructs an AnimationStyleBuilder object with all parameters set to defaults.
  • Method Details

    • getRelativeSpeed

      public float getRelativeSpeed()
      Returns the relative speed of the animation.
      Returns:
      The relative speed of the animation (1.0 corresponds to the default speed).
    • setRelativeSpeed

      public void setRelativeSpeed(float relativeSpeed)
      Sets the relative speed of the animation. The relative speed affects all phases of the animation.
      Parameters:
      relativeSpeed - The new relative speed of the animation.
    • getPhaseInDuration

      public float getPhaseInDuration()
      Returns the phase-in duration of the animation.
      Returns:
      The phase-in duration of the animation in seconds. By default this is 0.5.
    • setPhaseInDuration

      public void setPhaseInDuration(float duration)
      Sets the phase-in duration of the animation.
      Parameters:
      duration - The new phase-in duration of the animation in seconds.
    • getPhaseOutDuration

      public float getPhaseOutDuration()
      Returns the phase-out duration of the animation.
      Returns:
      The phase-out duration of the animation in seconds. By default this is 0.0, which means instant effect.
    • setPhaseOutDuration

      public void setPhaseOutDuration(float duration)
      Sets the phase-out duration of the animation.
      Parameters:
      duration - The new phase-out duration of the animation in seconds.
    • getFadeAnimationType

      public int getFadeAnimationType()
      Returns the fade animation type.
      Returns:
      The type of the fade animation.
    • setFadeAnimationType

      public void setFadeAnimationType(int animType)
      Sets the fade animation type.
      Parameters:
      animType - The new type of the fade animation.
    • getSizeAnimationType

      public int getSizeAnimationType()
      Returns the size-related animation type.
      Returns:
      The type of the size-related animation.
    • setSizeAnimationType

      public void setSizeAnimationType(int animType)
      Sets the size-related animation type.
      Parameters:
      animType - The new type of the size-related animation.
    • buildStyle

      public AnimationStyle buildStyle()
      Builds a new instance of the AnimationStyle object using previously set parameters.
      Returns:
      A new AnimationStyle object.