New key-frame based animations for OpenJFX - No Fluff Just Stuff

New key-frame based animations for OpenJFX

Posted by: Andres Almiray on December 20, 2007

Chris Olivier has posted an update on the new animation features available in the OpenJFX project. What is interesting about them is that you may find some of those features also in plain Groovy, which means that both languages should be easily understandable when going from one camp to the other and vice versa.

First he shows time literals like

which can be accomplished in Groovy following Daniel's example: create a base class like Time, plug it into numbers with MetaClass.propertyMissing.

The second feature introduces "pointers" into the language, something I'm convinced is not a good idea (remember that jfx should be a language for content authors, not just developers/programmers) but it any case Groovy allows "method borrowing" too (and I think there is something for properties too) thanks to ExpandoMetaClass
Lastly the tween, at and after operators resemble a basic DSL, which you can also do in Groovy in a couple of ways, the most common would be:
  • a builder
  • static import of static helper methods (also available in regular Java)
Kudos to the OpenJFX team for advancing the animation capabilities of the language (platform?) even though I do not agree with the pointers option. Another thing that raises eyebrows is Chris's opening comment
It's unfortunate that OpenJFX currently isn't a real open-source project. As such, it gives the appearance that progress isn't being made with JavaFX Script. Nevertheless, evolution has occurred, albeit internally.

So how open is "open" for Sun this days?
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »