Thursday, June 11, 2009

Download JavaFX 1.2 Blogging


Browse » Home » » Download JavaFX 1.2 Blogging

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 upward 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 named interpolator.
Old: public override var interpolate = Interpolator.LINEAR;
New: public override var interpolator = Interpolator.LINEAR;

The Transition class inherits from the Timeline class.

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.

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.

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

The following classes are new to the javafx.async package.

JavaTaskBase
RunnableFuture
Task

Effects


Package affected: javafx.scene.effect
The following classes are new to the javafx.scene.effect package.

BlurType
BoxBlur

Graphics


Packages affected: javafx.scene.transform, javafx.scene.image, javafx.ext.swing, javafx.scene, javafx.scene.layout, javafx.stage, javafx.geometry
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 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.

The javafx.scene package supports the following new classes:

Parent

The javafx.geometry package supports the following new classes:

BoundingBox
Bounds

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.

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.

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

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.

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, or rotate variables is the (untransformed) center of the layoutBounds.

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.
Old: node.boundsInScene
New: node.localToScene(node.boundsInLocal)

The javafx.scene.layout package now includes the following classes.

ClipView
Flow
LayoutInfo
LayoutInfoBase
Panel
Stack
Tile


Please see What's New in JavaFX 1.2: New Layouts and Effects for more information.
A new Boolean public-read protected variable needsLayout is inherited from the javafx.scene.Parent class in the ClipView, Flow, Panel, Stack, Tile, HBox, and VBox Classes.

The javafx.scene.layout packages, HBox and VBox, now support positioning of the node within the allocated space by using nodeVPos and nodeHPos respectively. Under JavaFX SDK 1.1, all nodes were positioned at the top for HBox, and to the left for VBox.

The following classes are new to the javafx.stage:

Alert
Screen

The new Screen class causes the javafx.screen.width and javafx.screen.height properties to become obsolete. The javafx.screen.width and javafx.screen.height are no longer supported from javafx.FX.getProperty().

The Screen class also includes a dpi property for querying both the screen size and resolution (DPI).

The focused variable in the javafx.stage.Stage class is now named containsFocus.

It is illegal to use a node in more than one place in any of the following: in the content sequence of a Group, as the clip of another node, or as the return value of the CustomNode.create() function. If the JavaFX 1.2 runtime detects an attempt to use a node in more than one place, it will throw an exception and ignore the attempt, except as noted below.

Previous releases of the JavaFX technology explicitly allowed a node to be inserted into the content sequence of a Group, even if the node was already a member of the content sequence of another Group. If this occurred, the node would implicitly be removed from the other Group. In the JavaFX 1.2 runtime, adding a node to a Group while the node is already a member of another Group is now considered illegal, as it is most likely a programming error. However, the implicit removal behavior is preserved, and a warning message and exception stack trace will be printed, in order to provide a transition period for existing code.

It is common to fetch named nodes from content loaded from an FXZ file created by the JavaFX Production Suite, and to place these nodes into new Groups.

var fxdContent = FXDLoader.loadContent("scene.fxz");
var g = Group {
content: [ fxdContent.getNode("myNode") ]
}

This code will generate a warning message in JavaFX 1.2 because the node retrieved from fxdContent is already a member of a Group created FXDLoader. To avoid this warning message, remove the node from the old Group before adding it to the new one. If you are using nodes loaded from an FXZ file, you can use the javafx.fxd.Duplicator class to copy nodes instead of moving them. Or, you can rearrange the structure of the artwork and regenerate the FXZ file. Avoid doing scene graph manipulations after loading the FXZ file.

Keyboard and Mouse Events


Packages affected: javafx.scene.control, javafx.ext.swing, javafx.scene.input
Node is not focusable by default and the key handler is not required for Node to become focused with two exceptions: Control and SwingComponent are focusable by default. The new focusTraversable variable is now included, and it is a Boolean. The focusTraversable variable specifies whether this Node should be a part of a focus traversal cycle.

A new source variable Node is now included in the MouseEvent class for event bubbling. The source variable is visually the topmost node in the node subtree under the mouse event. In the case where the node is a leaf node, the source variable is the same as the node. In the case where the node is an instance of the Parent, the source variable is visually the topmost node in the (@node) subtree under the mouse event.

The javafx.scene.input package now includes the following classes.

InputMethodEvent
InputMethodHighlight
InputMethodTextRun
MouseButton
TextInput

Language Changes

Please refer to the JavaFX Script Programming Language Reference.

Multiple inheritance: In JavaFX 1.1, a JavaFX class could inherit from classes and interfaces, with a complex rule about which classes could be inherited. In JavaFX 1.2, the concept of a mixin class has been added. Inheritance rules now include mixins and as a result are simplified and slightly restricted. A JavaFX class may now inherit from no more than one (non-mixin) class, and any number of interfaces or mixins. A mixin cannot be instantiated directly. Mixins look like regular classes, but have the mixin modifier on their declaration. For more information, see the JavaFX Language Tutorial.

A comma is now required in explicit sequences:

[3, 77, 8]

But, like a semicolon, a comma is not required after }:

[Foo {
x: 14
}
Bar {
sneeze: "cough"
}
]

The precedence of the or operator and the and operator is changed. The JavaFX and operator now has higher precendence than the or operator.

a or b and c

is equivalent to:

a or (b and c)

A var in a block cannot have the same name as a var in a containing block. The following are now disallowed:

public function f() {
var x : Integer;
{
var x : Integer; //compile error
}
}


Or
for(i in [1..5]) {
for(i in [2..4]) { //compile error
println("Test");
}
}

The on replace trigger is no longer allowed inside bind.

var x = bind for (i in [0..5]) {
var y = (i mod 2 == 0) on replace { //compile error
println("y changed");
}
y
}

Bound for-loops over Iterable are no longer allowed because they do not make sense and updates are not seen.

Changes to Duration include the following:

Duration.toMillis() returns Double instead of Number.
Duration.INDEFINITE now represents a time period of unknown length.
Duration.toDate() is no longer supported.

A number of reserved words are no longer formally reserved and can be used as identifiers:

first
in
init
into
inverse
last
on
postinit
replace
step
trigger
tween
where
with

Media


Package affected: javafx.scene.media
Real-time streaming protocol (RTSP) support is new. You can read more about RTSP on the RTSP wiki.

var url: String = "rtsp://sqe-macpro-2.sfbay.sun.com/sample_300kbit.mov";

Media supports two more OS platforms, OpenSolaris and Ubuntu Linux. Both platforms use the open source multimedia framework GStreamer.

Media has better support for video scrubbing.

Mobile

Mobile now supports rectangular clipping.

Cross-platform video (VP6 encoding) is supported, and FXM/VP6 is now included.

The Mobile Emulator (Windows platform only) supports additional media files:

FXM/FLV, WAV and MIDI files are now supported by default and no third-party components are needed.
For MP3 and AMR files, you must install the appropriate DirectShow filters (a splitter and a decoder). For example, the K-Lite Codec Pack contains all necessary filters. A combination of ffdshow and the MONOGRAM AMR Splitter works as well.
For 3GP, MPEG1, MP4, MOV files, you must install the Apple QuickTime player. If any of these formats do not work, reinstall the Apple QuickTime player and restart your computer.

Performance Improvements

The underlying implementation of scene graph refactoring provides better runtime performance.

Startup-time performance is an improvement over previous startup-time performance.

The compiler changes provide better runtime performance.

Please refer to the article on Performance Improvement Techniques for JavaFX Applications.


Persistence Storage

Package affected: javafx.io
A new javafx.io package now includes the following classes.

Resource
Storage

Platform Support

Support is now provided for two additional OS platforms:

Solaris Beta: OpenSolaris 2009.06
Linux Beta: Ubuntu 8.04 LTE

Production Suite


Package affected: javafx.fxd
Support is now provided for Adobe Photoshop CS4 and Adobe Illustrator CS4.

In the javafx.fxd package, the FXDLoader class has additional variables and functions. The FXDLoader class inherits from the javafx.async.Task class to support the background loading of FXZ/FXD files.

The FXDNode class is added. The UiStub class is replaced with the FXDNode class. UI Stub files now extend from the FXDNode class.

The FXDNode class provides a choice of how graphics content is loaded: synchronous (which blocks other operations) or asynchronous (which runs in the background).

Scene {content: FXDNode {
url: "{__DIR__}mygraphics.fxz"
backgroundLoading: true
placeholder: Text { x: 10 y: 10 content: "Loading graphics ..."}
}
}


The _root variable is no longer included in the FXDContent class. The getRoot() function provides the same support as the old _root variable.

UI Control Components


Package affected: javafx.scene.control
The new javafx.scene.control package now includes the following classes for creating UI controls.

Behavior
Button
ButtonBase
CheckBox
Control
Hyperlink
Keystroke
Label
Labeled
ListView
ProgressBar
ProgressIndicator
RadioButton
ScrollBar
Skin
Slider
TextBox
TextInputControl
ToggleButton
ToggleGroup

Please refer to the article on JavaFX Scene UI Controls.

UI Chart Components


Packages affected: javafx.scene.chart, javafx.scene.chart.data, javafx.scene.chart.part
The new javafx.scene.chart package now includes the following classes for chart components.

AreaChart
AreaChart.Data
AreaChart.Series
BarChart
BarChart.Data
BarChart.Series
BarChart3D
BubbleChart
BubbleChart.Data
BubbleChart.Series
Chart
LineChart
LineChart.Data
LineChart.Series
PieChart
PieChart.Data
PieChart3D
ScatterChart
ScatterChart.Data
ScatterChart.Series
XYChart

The new javafx.scene.chart.data package now includes the following classes for chart data components.

Data
Series

The new javafx.scene.chart.part package now includes the following classes for chart part components.

Axis
Axis.TickMark
CategoryAxis
Legend
Legend.LegendItem
NumberAxis
PlotSymbol
PlotSymbol.Circle
PlotSymbol.Cross
PlotSymbol.HollowDiamond
PlotSymbol.HollowTriangle
PlotSymbol.Square
Side
ValueAxis

Web Services


Packages affected: javafx.io.http, javafx.data.pull, javafx.data.xml, javafx.data.feed, javafx.data.feed.atom, javafs.data.feed.rss
HttpRequest.enqueue() is now named HttpRequest.start().

HttpRequest.cancel() is now named HttpRequest.stop().

These two public functions are no longer included:

public function setHeader(name: String, value: String)
public function getResponseHeaderNames(): String[]

The signature of these methods and fields changed from Integer to Long:

public-read protected var towrite: Long;
public-read protected var toread: Long;
public-read protected var written: Long;
public-read protected var read: Long;
public var onToWrite: function(bytes: Long): Void = null;
public var onToRead: function(bytes: Long): Void = null;
public var onWritten: function(bytes: Long): Void = null;
public var onRead: function(bytes: Long): Void = null;

The URLConverter class is now included in the javafx.io.http package.

The new javafx.data.feed package includes the following two classes:

Base
FeedTask

The new javafx.data.feed.atom package includes the following classes:

Atom
AtomTask
Category
Content
Date
Entry
Factory
Feed
Generator
Id
Link
Person

A new javafx.data.feed.rss package includes the following classes:

Category
Channel
Enclosure
Factory
Guid
Image
Item
RSS
RssTask
Source

Miscellaneous

Packages affected: javafx.util, javafx.data

The new javafx.date package has a DateTime class.

The following classes are new in the javafx.util package:

Math
Properties

The new javafx.data package includes the following two classes:

Converter
Pair

Free Download JavaFX 1.2 Blogging

Related Posts Plugin for WordPress, Blogger...

Related Posts:


Or

Jika Anda menyukai Artikel di blog ini, Silahkan klik tombol subscribe di bawah untuk berlangganan gratis, dengan begitu Anda akan mendapat artikel terbaru via email dari www.faikshare.com


0 comments:

Blog Award

 

FaiK Share. Copyright 2008 All Rights Reserved Revolution of FaiK theme by FaiK MuLaCheLLa | Distributed by Blogger Templates Blog Corp