<?xml version="1.0" encoding="utf-8"?> <mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" width="104" height="28" cornerRadius="10" fillColors="[#00ff00, #00B000]" label="Add Item" fontSize="12" click="greenClickEventHandler()"> <mx:Metadata> [Event(name="addItemEvent", type="flash.events.Event")] </mx:Metadata> <mx:Script> <![CDATA[ private function greenClickEventHandler():void{ trace(" Ouch! I got clicked! Let me tell this to the world."); dispatchEvent(new Event("addItemEvent", true)); } ]]> </mx:Script> </mx:Button>
La percée d’Adobe
Points Forts
Pénétration du plugin Flash > 98%
Communauté importante
Flex 3 SDK sera open source
Flex Builder en Eclipse
Intégration avec applications Web existantes
Blaze DS gratuit
Indépendant de la techno coté serveur
Points Faibles
Solution propriétaire
Adaptation au monde de l’entreprise
Nécessité de maitriser un nouveau langage
Dépendant du Flash Player
La continuité de Sun
JavaFX
Ensemble d’outils pour la mise en œuvre d’applications RIA
Java FX Script
F3 – Chris Oliver
Langage de script pour la conception rapide de UI riches
Java FX Mobile
J2ME + API
Swing - le retour
Amélioration des performances depuis Java 6
SwingLabs
JDIC, SwingX
Outils
NetBeans 6.0
Java FX Pad
NetBeans Platform
RCP
Exemple de code Java FX Script import javafx.ui.*; import javafx.ui.canvas.*; import java.util.Date; import java.lang.Math; import java.lang.System; public class Timer { private attribute elapsed: Number; public attribute minutes: Number; public attribute seconds: Number; public attribute hours: Number; public attribute running: Boolean; } attribute Timer.elapsed = bind if running then [1..20] dur 1000 linear while running continue if true else 0; trigger on Timer.elapsed = value { var now = new Date(); minutes = now.getMinutes(); seconds = now.getSeconds() + (now.getTime() % 1000)/1000; hours = now.getHours(); } public class Clock extends CompositeNode { public attribute ticking: Boolean; } operation Clock.composeNode() { var t = Timer {running: bind ticking}; return Group { var font = new Font("Dialog", "PLAIN", 15) var secs = bind t.seconds var mins = bind t.minutes + secs/60 var hrs = bind t.hours + mins/60
0 comments
Post a comment