Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TranslateTransition

[9:7] extends: FxObj

Represents a JavaFX TranslateTransition that animates the position of a node.

Methods

  • TranslateTransition (double Millis)

    Creates a new TranslateTransition with the specified duration.

    • @p Millis is a double with the animation duration in milliseconds.
  • setNode (object NodeObj)

    Sets the target node for this translation animation.

    • @p NodeObj is the scene-graph node to animate.
    • @r this object.
  • setFromX (double Val)

    Sets the starting X position for the translation animation.

    • @p Val is a double with the starting X coordinate in pixels.
    • @r this object.
  • setFromY (double Val)

    Sets the starting Y position for the translation animation.

    • @p Val is a double with the starting Y coordinate in pixels.
    • @r this object.
  • setToX (double Val)

    Sets the ending X position for the translation animation.

    • @p Val is a double with the ending X coordinate in pixels.
    • @r this object.
  • setToY (double Val)

    Sets the ending Y position for the translation animation.

    • @p Val is a double with the ending Y coordinate in pixels.
    • @r this object.
  • setCycleCount (int Count)

    Sets the number of times the animation cycles before stopping.

    • @p Count is an int with the cycle count; pass -1 for indefinite looping.
    • @r this object.
  • setAutoReverse (bool Auto)

    Sets whether the animation reverses direction on alternating cycles.

    • @p Auto is a bool; true enables auto-reverse.
    • @r this object.
  • play ()

    Starts playing the translation animation.

    • @r this object.
  • stop ()

    Stops the translation animation.

    • @r this object.
  • setOnFinished (callback OnFinished)

    Registers a callback to invoke when the animation finishes.

    • @p OnFinished is a callback invoked with an ActionEvent when the animation completes.
    • @r this object.