- Skill Level Beginner
- Product JavaFX
- Key Features Performance, Graphics, Language Enhancements
- Last Updated May 2009
The JavaFX 1.2 SDK is a significant update to the JavaFX 1.1 SDK. The JavaFX 1.2 SDK includes changes to the APIs that are not forward compatible. Some classes, APIs, and variables have been removed from the JavaFX 1.1 SDK, while newer classes, APIs, and variables have been added to the JavaFX 1.2 SDK.
The JavaFX 1.2 SDK release is not binary compatible with the JavaFX 1.1 SDK. This means that your application and all libraries that it depends on must be recompiled with the JavaFX 1.2 SDK.
Legend (Added: , Removed: , Changed: )
Animation
Packages affected: javafx.animation, javafx.animation.transition
Transition.interpolate
is now namedinterpolator
.
Old: public override var interpolate = Interpolator.LINEAR;
New: public override var interpolator = Interpolator.LINEAR;
The Transition
class inherits from theTimeline
class.The Transition.duration
variable inSequentialTransition
andParallelTransition
is inaccessible. However, the public-read protected variablescycleDuration
andtotalDuration
are now included in theTimeline
.
public-read protected var cycleDuration: Duration
public-read protected var totalDuration: Duration
- The
timelines
variable is no longer included inKeyFrame
. Subtimelines are no longer supported. This functionality is now supported byParallelTransition
andSequentialTransition
.
- The
timelineDirty
variable is no longer included in theTransition
class. ThemarkDirty()
function provides the same support as the oldtimelineDirty
variable.timelineDirty
, previously a protected variable of theTransition
class, is now a local variable and can be modified through a protectedmarkDirty()
function in theTransition
class. This change enables a third-party library to extend the JavaFXTransition
base class to implement additionalTransition
classes. The existingTransition
classes, such asTranslationTransition
,RotateTranslation
, andPathTransition
, work as before.
Old: timelineDirty = true;
New: markDirty()
Asynchronous Operations
Package affected: javafx.async
- The
AbstractAsyncOperation
andRemoteTextDocument
classes are no longer included in thejavafx.async
package. Thejavafx.io.http.HttpRequest
class can be used instead of thejavafx.async.RemoteTextDocument
class.
- The following classes are new to the
javafx.async
package.
Effects
Package affected: javafx.scene.effect
Graphics
Packages affected: javafx.scene.transform, javafx.scene.image, javafx.ext.swing, javafx.scene, javafx.scene.layout, javafx.stage, javafx.geometry, javafx.scene.paint
- The variables for the matrix elements in the
javafx.scene.transform.Affine
class are now named as follows:m00 --> mxx
m01 --> mxy
m02 --> tx
m10 --> myx
m11 --> myy
m12 --> ty
However, the more common use case of using theTransform.affine
method is not affected.
Old: Affine { m00: 1 m10: 0 m01: 0 m11: 1 m02: 25 m12: 15 }
New: Affine { mxx: 1 myx: 0 mxy: 0 myy: 1 tx: 25 ty: 15 }
javafx.scene.image.Image.fromBufferedImage(image:java.awt.image.BufferedImage)
is now namedjavafx.ext.swing.SwingUtils.toFXImage(image:java.awt.image.BufferedImage)
. The parameters and functionality are identical to the old method.- The
javafx.scene
package supports the following new classes:
- The
javafx.geometry
package supports the following new classes:
- No events should be delivered when
Node
is disabled.- An application should not expect events on a disabled
Node
. - Mouse and key event handlers should not be invoked when
Node
is disabled. - A focused
Node
should lose focus when it becomes disabled.
- An application should not expect events on a disabled
- The
enabled
variable of Swing components in thejavafx.ext.swing
package is no longer included. Thedisable
variable is still available and sufficient to handle the enabling and disabling of components. - New layout variables are now included in
javafx.scene.Node
,javafx.scene.CustomNode
, andjavafx.scene.Group:
layoutInfo
layoutBounds
layoutX
layoutY
- The preferred method to position a node for layout is
layoutX
andlayoutY
instead of usingtranslateX
andtranslateY
. WhiletranslateX
andtranslateY
most likely will work,layoutX
andlayoutY
will have better performance. Also, if you do a legitimatetranslateX
andtranslateY
, the original value is lost if you did not uselayoutX
andlayoutY
. - The default
layoutBounds
of a Node does not include clip, its effect, or any of its transforms. - The implicit pivot of a Node when using the
scaleX
,scaleY
, orrotate
variables is the (untransformed) center of thelayoutBounds
. - The
boundsInScene
variable is no longer included in theNode
,Group
, andCustomNode
classes. ThelocalToScene(boundsInLocal)
function provides the same support as the oldboundsInScene
variable. TheboundsInScene
variable was expensive to compute, and thelocalToScene(boundsInLocal)
function gives better performance because binding to thelocalToScene
function is not allowed.
Old: node.boundsInScene
New: node.localToScene(node.boundsInLocal)
- The
javafx.scene.layout
package now includes the following classes.
Tidak ada komentar:
Posting Komentar