Wednesday, March 28, 2012

Java FX Past, present and Future - SWT and Swing


JavaFX is a reboot of the Java UI platform that is light weight and hardware accelerated to meet tomorrow's needs.

JavaFX is a full featured and modern API, which includes:

  • Data binding
  • FXML declarative markup
  • CSS
  • Tasks
  • Graphics
  • Controls
  • Events
  • Layout
  • Media
  • Browser
  • Charts
  • Swing and SWT integration

JavaFX is scene based.  Graphics are stored in a tree structure, and unlike Swing, there is no painting.  Instead, to do custom drawing, one should use components in leaf nodes of the tree.  Graphics support transformations (e.g., scaling, rotation, etc.), effects (e.g., blur, drop shadow, etc.) and animations.

JavaFX has its own threading model, with one thread for native UI updates.  However, when integrated in SWT via the FXCanvas component, it shares the same thread as the SWT thread for its events.  The result is more seamless.

No comments:

Post a Comment