"The only reason for time is so that everything doesn't happen at once."
- Albert Einstein
Although it is good that everything doesn't happen at once, it is also good, when planning the future, to be able to see everything at once. One of the current trends in user interfaces is the movement away from a page-based approach to a more fluent and spatial approach. The JavaFX application that I'd like to demonstrate for you today uses the latter approach to enable users to take full control of their calendars. Because this application uses JavaFX, it can utilize the Java version of the Google Calendar Data API directly in order to retrieve and update items in the calendar.
As shown in the screen shot above, the calendar is displayed as a rectangular cuboid with each layer on the Z axis containing a month. Each month layer contains a 7 x 5 matrix of cubes, most of which represent the days in that month. Dragging the mouse on the face of the calendar cuboid causes it to rotate in the direction of the mouse drag, bringing the desired face of the cuboid into view. For example, the screen shot below shows the left and top faces of the cuboid, which contain all of the Sundays in the year, and all of the first partial weeks in the year, respectively:
As shown below, by using the mouse wheel the user can remove rows, columns, and layers from the calendar, quickly exposing the desired day cubes:
Clicking a day cube, and performing another gesture (currently pressing the W key), shows a block of cubes for the desired week:
Similarly, performing the show selected month gesture (currently pressing the M key), shows a block of cubes for the desired month:
Clicking on an event, as shown above, displays a dialog box in which the user can edit the details of the event and choose the Save or Cancel buttons. Finally, double-clicking a day cube (in this case April 22 which is Earth Day and the day that JavaFX 1.3 was released) causes that cube to move closer to the user:
A Brief Video Demonstration of CalendarCubeFX
Some JavaFX 1.3 SDK features used in CalendarCubeFX
I'm going to expound on the JavaFX code used to create the CalendarCubeFX example in an upcoming article, but wanted to briefly point out some of the 3D-related features in the JavaFX 1.3 SDK API:
- There is a new package, named javafx.runtime, which contains classes that allow an application to query the capabilities of the platform. One of these capabilities is represented by the SCENE3D constant of the ConditionalFeature class.
- The Point3D class in the javafx.geometry package represents a point in 3D space, with variables named x, y and z.
- The Node class contains scaleZ and translateZ variables, for scaling and translating (moving) a node on the Z axis.
- The Node class contains a rotationAxis variable, which defines the rotation axis (X, Y or Z) on which a node will rotate at the angle specified in that node's rotate variable.
- The Rotate and Scale classes contained in the javafx.scene.transform package have instance variables named pivotX, pivotY and pivotZ that define a rotation pivot point.
- The RotationTransition, ScaleTransition, and TranslateTransition classes accept a three dimensional axis.
- The PerspectiveCamera class, located in the javafx.scene package, defines a viewing volume (which is shaped like a truncated right pyramid) for a perspective projection. Its fieldOfView variable specifies the vertical angle of the camera's projection.
What Else is New in JavaFX 1.3?
To read about more of the new features in JavaFX 1.3, check out Stephen Chin's Top Ten List. Of course, check out java.sun.com and javafx.com as well. Thanks, by the way, to Dean Iverson for using the new CSS features in JavaFX 1.3 to style the Edit Event Details dialog box shown in the month view screen shot above.
RIA Exemplar Challenge Deadline is May 22, 2010
The clock is now ticking for the RIA Exemplar Challenge deadline, so mark May 22, 2010 on your calendar! Now that the JavaFX 1.3 SDK is available, please feel free to use the 3D features in your entry if your development platform supports the SCENE3D conditional feature. To enable this conditional feature on my development platform, I used the following JVM argument: -Xtoolkit prism
I plan to continue developing CalendarCubeFX as an example entry for the RIA Exemplar Challenge. After the Challenge is over, I plan to donate it to the JFXtras open source project. For example, the functionality contained in the Cuboid UI control shown above could be used for interacting with any sort of multidimensional data.
Regards, and congratulations/thanks to the JavaFX team for the 1.3 release!
Jim Weaver
Really great. How can we run it? Have you posted the jnlp link yet?
Posted by: p90x dvd | June 30, 2010 at 10:13 PM
Hi,I’m taking some time to write you a comment. I hope you don’t mind I’ve bookmarked your page, your article is genuinely usefull for me,http://www.mbtselling.com
Posted by: mbt shoes | June 05, 2010 at 04:37 AM
Thanks Jim, I'm enjoying playing with the 1.3 release. Start-up time is dramatically improved over 1.2.
Posted by: Vance Turnewitsch | May 02, 2010 at 08:24 AM
any one to help me with the applets showing a kid moving from side to the other.
Posted by: samson daudi mbewe | May 02, 2010 at 06:02 AM