Minggu, 04 Oktober 2009

JavaFX 1.2 Technology: Features and Enhancements

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: Add icon, Removed: Remove icon, Changed: Changed icon)


Packages affected: javafx.animation, javafx.animation.transition

  • Transition.interpolate is now named interpolator. Changed icon

    Old: public override var interpolate = Interpolator.LINEAR;
    New: public override var interpolator = Interpolator.LINEAR;
  • The Transition class inherits from the Timeline class. Changed icon

  • The Transition.duration variable in SequentialTransition and ParallelTransition is inaccessible. However, the public-read protected variables cycleDuration and totalDuration are now included in the Timeline. Remove icon Add icon

    public-read protected var cycleDuration: Duration
    public-read protected var totalDuration: Duration

  • The timelines variable is no longer included in KeyFrame. Subtimelines are no longer supported. This functionality is now supported by ParallelTransition and SequentialTransition. Remove icon

  • The timelineDirty variable is no longer included in the Transition class. The markDirty() function provides the same support as the old timelineDirty variable. timelineDirty, previously a protected variable of the Transition class, is now a local variable and can be modified through a protected markDirty() function in the Transition class. This change enables a third-party library to extend the JavaFX Transition base class to implement additional Transition classes. The existing Transition classes, such as TranslationTransition, RotateTranslation, and PathTransition, work as before. Rename

    Old: timelineDirty = true;
    New: markDirty()

Asynchronous Operations

Package affected: javafx.async

  • The AbstractAsyncOperation and RemoteTextDocument classes are no longer included in the javafx.async package. The javafx.io.http.HttpRequest class can be used instead of the javafx.async.RemoteTextDocument class. Remove icon

  • The following classes are new to the javafx.async package. Add icon


Package affected: javafx.scene.effect

  • The following classes are new to the javafx.scene.effect package. Add icon


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: Changed icon

        m00 --> mxx
    m01 --> mxy
    m02 --> tx
    m10 --> myx
    m11 --> myy
    m12 --> ty

    However, the more common use case of using the Transform.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 named javafx.ext.swing.SwingUtils.toFXImage(image:java.awt.image.BufferedImage). The parameters and functionality are identical to the old method. Changed icon

  • The javafx.scene package supports the following new classes: Add icon

  • The javafx.geometry package supports the following new classes: Add icon

  • No events should be delivered when Node is disabled. Changed icon

    • 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.

  • The enabled variable of Swing components in the javafx.ext.swing package is no longer included. The disable variable is still available and sufficient to handle the enabling and disabling of components. Remove icon

  • New layout variables are now included in javafx.scene.Node, javafx.scene.CustomNode, and javafx.scene.Group: Add icon

    • layoutInfo
    • layoutBounds
    • layoutX
    • layoutY

  • The preferred method to position a node for layout is layoutX and layoutY instead of using translateX and translateY. While translateX and translateY most likely will work, layoutX and layoutY will have better performance. Also, if you do a legitimate translateX and translateY, the original value is lost if you did not use layoutX and layoutY. Add icon

  • The default layoutBounds of a Node does not include clip, its effect, or any of its transforms. Rename

  • The implicit pivot of a Node when using the scaleX, scaleY, or rotate variables is the (untransformed) center of the layoutBounds. Rename

  • The boundsInScene variable is no longer included in the Node, Group, and CustomNode classes. The localToScene(boundsInLocal) function provides the same support as the old boundsInScene variable. The boundsInScene variable was expensive to compute, and the localToScene(boundsInLocal) function gives better performance because binding to the localToScene function is not allowed. Rename

    Old: node.boundsInScene
    New: node.localToScene(node.boundsInLocal)
  • The javafx.scene.layout package now includes the following classes. Add icon

Sumber : Copas dari http://javafx.com/docs/articles/javafx1-2.jsp

Tidak ada komentar: