--- a/modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html +++ b/modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html @@ -253,6 +253,7 @@
JavaFX supports implicit transitions for properties that are styled by CSS. When a property value is
+ changed by CSS, it transitions to its new value over a period of time. Implicit transitions are supported for
+ all primitive types, as well as for types that implement javafx.animation.Interpolatable
.
Transitions can be defined for any node in the JavaFX scene graph with the following properties:
+CSS Property | +Values | +Default | +Comments | +
---|---|---|---|
transition‑property | +[ none | all | <custom‑ident># ] | +all | +The name of the CSS property to which the transition is applied. | +
transition‑duration | +<duration># | +0s | +The duration of the transition, not including an optional delay before the transition starts. | +
transition‑timing‑function | +<easing‑function># | +ease | +The easing function that is used to calculate the intermediate values. | +
transition‑delay | +<duration># | +0s | +The delay after which the transition starts. If a negative delay is specified, the transition starts + as if it had already been running for the specified time. | +
transition | +
+ <single-transition>#
+ + where <single‑transition> = [ none | all | <custom‑ident> ] || + <duration> || + <easing‑function> || + <duration> + |
+ + | Short-hand notation for the individual properties. Note that while the order of the values generally + doesn't matter, the first duration is always assigned to the transition-duration + property, while the second duration is always assigned to the transition-delay + property. | +
A transition is not started (or cancelled if already running) in any of these scenarios: +
A button that smoothly changes its opacity on mouse-hover can be defined in a stylesheet like this:
++ .button { + -fx-opacity: 0.8; + transition-property: -fx-opacity; + transition-duration: 0.5s; + } + + .button:hover { + -fx-opacity: 1; + } +
+Beginning with JavaFX 8u20, the CSS @@ -800,6 +887,8 @@ sheet.
linear | <cubic-bezier-easing-function> | <step-easing-function> | <fx-easing-function>
+Linear linear
+ The linear easing function is a simple linear mapping from the input progress value to the output progress value.
Cubic Bézier Easing Functions <cubic-bezier-easing-function>
+ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)
+The values have the following meaning:
+ease | +equivalent to cubic-bezier(0.25, 0.1, 0.25, 1) | +
ease-in | +equivalent to cubic-bezier(0.42, 0, 1, 1) | +
ease-out | +equivalent to cubic-bezier(0, 0, 0.58, 1) | +
ease-in-out | +equivalent to cubic-bezier(0.42, 0, 0.58, 1) | +
cubic-bezier | +defines the control points P1 and P2 using four real numbers: (xP1, yP1, xP2, yP2) | +
A cubic Bézier function is defined by four control points, where P0 is fixed at (0,0) and P3 is fixed at (1,1). + P1 and P2 are restricted to the interval [0,1] on the input progress axis:
+ +Step Easing Functions <step-easing-function>
+step-start | step-end | steps(<integer>[,<step-position>]?)
+where <step-position> = jump-start | jump-end | jump-none | jump-both | start | end
+The values have the following meaning:
+step-start | +equivalent to steps(1, start) | +
step-end | +equivalent to steps(1, end) | +
steps | +defines a step function with <integer> intervals
+ and an optional <step-position>; if omitted, + end is implied + |
+
jump-start | +the interval starts with a rise point when the input progress value is 0 | +
jump-end | +the interval ends with a rise point when the input progress value is 1 | +
jump-none | +all rise points are within the open interval (0..1) | +
jump-both | +the interval starts with a rise point when the input progress value is 0, + and ends with a rise point when the input progress value is 1 | +
start | +equivalent to jump-start | +
end | +equivalent to jump-end | +
Examples of step easing functions:
+ + + + +SMIL 3.0 Easing Functions <fx-easing-function>
+-fx-ease-in | -fx-ease-out | -fx-ease-both
+The values have the following meaning:
+-fx-ease-in | +SMIL 3.0 ease-in function with an acceleration factor of 0.2 | +
-fx-ease-out | +SMIL 3.0 ease-out function with a deceleration factor of 0.2 | +
-fx-ease-both | +SMIL 3.0 ease-in/out function with an acceleration and decelaration factor of 0.2 | +
These functions are provided for compatibility with javafx.animation.Interpolator
+ implementations of SMIL 3.0 cubic bezier easing functions.
The geometry of text can be measured either in terms of the bounds of the particular text to be rendered - visual bounds, or as properties