Oracle
  • Select Country/Region
  • Select Country/Region
  • Communities
  • I am a...
  • I want to...
  • Welcome
  • Account
  • Sign Out
  • Sign In/Register for Account
  • Help
  • Products and Services

  • Solutions

  • Downloads

  • Store

  • Support

  • Training

  • Partners

  • About

  • Oracle Technology Network

Oracle Technology Network Java JavaFX Documentation
  • Java SE
  • Java EE
  • Java ME
  • Java SE Support
  • Java SE Advanced & Suite
  • Java Embedded
  • JavaFX
  • Java DB
  • Web Tier
  • Java Card
  • Java TV
  • New to Java
  • Community
  • Java Magazine
  • Java Advanced
  • Overview
  • Downloads
  • Documentation
  • Tools
  • Community
  • Samples

FXD Specification

expand all

Profile: desktop, common

  • animation

    • KeyFrame
    • KeyValue
    • Timeline
  • animation.transition

    • AnimationPath
    • FadeTransition
    • ParallelTransition
    • PathTransition
    • PauseTransition
    • RotateTransition
    • ScaleTransition
    • SequentialTransition
    • TranslateTransition
  • fxd

    • FXDNode
  • geometry

    • BoundingBox
    • Dimension2D
    • Insets
    • Point2D
    • Point3D
    • Rectangle2D
  • scene

    • Cursor
    • Group
    • ImageCursor
    • ParallelCamera
    • PerspectiveCamera
    • Scene
  • scene.chart

    • AreaChart
    • BarChart
    • BarChart3D
    • BubbleChart
    • LineChart
    • PieChart
    • PieChart3D
    • ScatterChart
  • scene.chart.data

    • Data
    • Series
  • scene.chart.part

    • CategoryAxis
    • Legend
    • NumberAxis
  • scene.control

    • Behavior
    • Button
    • CheckBox
    • ChoiceBox
    • Hyperlink
    • IndexedCell
    • Keystroke
    • Label
    • ListCell
    • ListView
    • PasswordBox
    • ProgressBar
    • ProgressIndicator
    • RadioButton
    • ScrollBar
    • ScrollView
    • Separator
    • Slider
    • TextBox
    • ToggleButton
    • ToggleGroup
    • Tooltip
  • scene.effect

    • Blend
    • Bloom
    • BoxBlur
    • ColorAdjust
    • DisplacementMap
    • DropShadow
    • FloatMap
    • Flood
    • GaussianBlur
    • Glow
    • Identity
    • InnerShadow
    • InvertMask
    • Lighting
    • MotionBlur
    • PerspectiveTransform
    • Reflection
    • SepiaTone
    • Shadow
  • scene.effect.light

    • DistantLight
    • PointLight
    • SpotLight
  • scene.image

    • Image
    • ImageView
  • scene.layout

    • ClipView
    • Container
    • Flow
    • HBox
    • LayoutInfo
    • Panel
    • Stack
    • Tile
    • VBox
  • scene.media

    • AudioTrack
    • Media
    • MediaError
    • MediaPlayer
    • MediaTimer
    • MediaView
    • SubtitleTrack
    • VideoTrack
  • scene.paint

    • Color
    • LinearGradient
    • RadialGradient
    • Stop
  • scene.shape

    • Arc
    • ArcTo
    • Circle
    • ClosePath
    • CubicCurve
    • CubicCurveTo
    • DelegateShape
    • Ellipse
    • HLineTo
    • Line
    • LineTo
    • MoveTo
    • Path
    • Polygon
    • Polyline
    • QuadCurve
    • QuadCurveTo
    • Rectangle
    • SVGPath
    • ShapeIntersect
    • ShapeSubtract
    • VLineTo
  • scene.text

    • Font
    • Text
  • scene.transform

    • Affine
    • Rotate
    • Scale
    • Shear
    • Translate
  • Copyright 2008-2010
    Oracle Corporation
    Use is subject to license terms.

RotateTransition

Inherits from: Transition > Timeline

Overview

This Transition creates a rotation animation that spans its #duration. This is done by updating the rotate variable of the node at regular interval. The angle value is specified in degrees.

It starts from the fromAngle if provided else uses the node's rotate value.

It stops at the toAngle value if provided else it will use start value plus byAngle.

The toAngle takes precedence if both toAngle and byAngle are specified.

Code Segment Example:

             
import javafx.scene.shape.*;
import javafx.animation.transition.*;

...

    var node = Rectangle {
        x: 100 y: 40
        height: 100 width:  100
        arcHeight: 50 arcWidth: 50
        fill: Color.VIOLET
    }

    var rotTransition = RotateTransition {
        duration: 3s node: node 
        byAngle: 180 repeatCount:4 autoReverse: true
    }
    rotTransition.play();

...


          


Profile: common

Variable Summary

nametype Default Value description
duration Duration 400ms

The length of this Transition, in milliseconds. This may only be changed prior to starting the transition or after the transition has ended. If changed during a transition then the change will not take effect until the next transition.

axis Point3D null

Specifies the axis of rotation for this Transition. Use node.rotationAxis for axis of rotation if this axis is null.

fromAngle Number Transition.UNDEFINED

Specifies the start angle value for this Transition.

toAngle Number Transition.UNDEFINED

Specifies the stop angle value for this Transition.

byAngle Number Transition.UNDEFINED

Specifies the incremented stop angle value, from the start, of this Transition.

Inherited Variables

Transition

nametype Default Value description
node Node null

The target node of this Transition.

interpolator Interpolator EASEBOTH

Controls the timing for acceleration and deceleration at each transition cycle. This may only be changed prior to starting the transition or after the transition has ended. If changed during a transition then the change will not take effect until the next transition.

Default interpolator is set to Interpolator#EASEBOTH.

Timeline

nametype Default Value description
rate Number 1.0

Defines the direction/speed at which the Timeline is expected to be played.

The absolute value of rate indicates the speed which the Timeline is to be played, while the sign of rate indicates the direction. A postive value of rate indicates forward play, a negative value indicates backward play and 0.0 to stop a running timeline.

Rate 1.0 is normal play, 2.0 is 2 time normal, -1.0 is backwards, etc...

Inverting the rate of a running Timeline will cause the Timeline to reverse direction in place and play back over the portion of the Timeline that has alreay elapsed.

time Duration 0s

Defines the Timeline's play head position.

If Timeline is running, it jumps to the specified position immediately. If it is not running, the time indicates from where the Timeline to start when next play() is called.

If user wants to bind the variable and update it simultaneously, bidirectional bind is needed.

var pos: Duration;
var t: Timeline = Timeline {
time: bind pos with inverse;
...
}

interpolate Boolean true

Enable/disable interpolation.

repeatCount Number 1.0

Defines the number of cycles in this animation. The repeatCount may be INDEFINITE for animations that repeat indefinitely, but must otherwise be >= 0.

autoReverse Boolean false

Defines whether this animation reverses direction on alternating cycles. If true, the animation will proceed forward on the first cycle, then reverses on the second cycle, and so on. Otherwise, animation will loop such that each cycle proceeds forward from the initial KeyFrame.

keyFrames KeyFrame

Defines the sequence of KeyFrames in this animation. KeyFrames are expected to have time >= 0s, otherwise they will be ignored. If a KeyFrame is not provided for the time==0s instant, one will be synthesized using the target values that are current at the time #play() or #playFromStart() is called.

framerate Number

The maximum framerate at which this animation will run, in frames per second. This can be used, for example, to keep particularly complex Timelines from over-consuming system resources. By default, a Timeline's framerate is not explicitly limited, meaning the Timeline will run at an optimal framerate for the underlying platform.

    E-mail this page    Printer View Printer View
 
    Oracle Cloud
  • Learn About Oracle Cloud
  • Get a Free Trial
  • Learn About PaaS
  • Learn About SaaS
  • Learn About IaaS
    Java
  • Learn About Java
  • Download Java for Consumers
  • Download Java for Developers
  • Java Resources for Developers
  • Java Cloud Service
  • Java Magazine
    Customer and Events
  • Explore and Read Customer Stories
  • All Oracle Events
  • Oracle OpenWorld
  • JavaOne
    Communities
  • Blogs
  • Discussion Forums
  • Wikis
  • Oracle ACEs
  • User Groups
  • Social Media Channels
    Services and Store
  • Log In to My Oracle Support
  • Training and Certification
  • Become a Partner
  • Find a Partner Solution
  • Purchase from the Oracle Store
  • Contact and Chat
    Global Contacts
    Oracle Support
    Phone: 800-633-0738
 

Hardware and Software, Engineered to Work Together

  • Subscribe
  • Careers
  • Contact Us
  • Site Maps
  • Legal Notices
  • Terms of Use
  • Privacy
  •  
  • Facebook
  • LinkedIn
  • Twitter
  • Google+
  • YouTube
  • Oracle RSS Feed