override function create():Node { stack.effect = if(enableReflection)Reflection{fraction:0.35} else null; stack }
I knew this is the way you created CustomNode in JavaFX, but Control would have to be a different beast. Its online documentation doesn't tell anything about extending. Searching gave me some interesting information on JavaFX forum and I was directed to CustomNode doc which says, that overriding create function is the way of dinosaurs. Now one should override children variable.
JavaONE 2010
...
And all the above and all the work done by author of the mentioned book and numerous people working on JavaFX Script libraries, components, books, sessions and docs will become deprecated in a year, because Oracle decided to drop JavaFX Script from JavaFX 2.0 release. Instead you will be able to write against JavaFX libraries in Scala, Groovy, Jython, JRuby and plain old Java and there will be WebPane at last. It's a shame JavaFX Script is going to go out of JavaFX platform, but I guess it didn't see a lot adoption, developers wanted more integration with their favorite languages and Oracle being very pragmatic decided there's no point in pushing new language. I felt something was wrong with Tor Norby when listening to JavaPosse and now I know why. I don't think Oracle will tell a word about JavaFX Authoring Tool. There's no need for such a tool in corporate environment.
I'm sad that JavaFX Script is going away. I really like the ease of literal objects creation, binding, animation syntax. Maybe it will be fully open sourced (yeah, I know it's Oracle, but I can dream, right?) someone will pick it up and make it as yet another language running on JVM?
Anyway, Oracle is really strengthening Java in RIA space. Especially opening JavaFX libraries to other languages and creating WebPane are great moves.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.