Sunday, August 3, 2008

the raging JavaFX

Rich Internet Application or RIA was around for over 2 years if I am not mistaken, promising for the next tool for cloud computing. It was first heard from Adobe Flex which is now the Macrodmedia Flex. And lately first quarter of this year Microsoft realease its Silver Light to counter part with the Flex. But I notice wheres the RIA goes? Does M Adobe Flex or MS Silver Light conquire RIA? Or there is something lacking or maybe developers are waiting for something...
And what is something ...

I think it was the JavaFX( ). It seems like JavaFX was finally unleashed from its cage .

The first release SDK was compose of the following elements
1) JavaFX Compiler & Runtime tools.
2) 2D Graphics and Media Libraries.
3) Tutorials API docs, and Sample Code.
4) NetBeans Plug-in
5) Project Nile- a suite of tools and plug-ins

Let alone JavaFX conquir RIA... coz "You know whats there... immortality, shaking ... its yours" (joke...)

so be gone, lets play with it...

let start experimenting with this simple cool demo.

import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.geometry.*;
import javafx.application.*;
import javafx.scene.transform.*;
import javafx.input.*;
import javafx.animation.*;
import java.lang.System;
var angle = 0.0;
Frame {
windowStyle: WindowStyle.TRANSPARENT visible: true
width: 400 height: 400
stage: Stage {
fill: null
content: Group {
translateX: 100 translateY: 100
content: for(i in [0..10]) {
// here is the magic with binding
Rectangle {
fill: Color.rgb(25*i,0,0, i/10.0)
width: 100 height: 100 arcHeight: 10 arcWidth: 10
stroke: Color.BLACK strokeWidth: 5
transform: bind [
onMousePressed: function(e:MouseEvent):Void { System.exit(0); }
var anim = Timeline { keyFrames: [
KeyFrame { time: 0s values: angle => -360 tween Interpolator.EASEBOTH },
KeyFrame { time: 2s values: angle => 360 tween Interpolator.EASEBOTH },
autoReverse: true
repeatCount: Timeline.INDEFINITE

No comments:

Post a Comment