Skip to main content
Last updated April 11, 2013 22:01, by Tim Halloran
Feedicon  

FAQ

This page answers frequently asked questions about the Timing Framework project and its developers.


Is Maven supported?

Yes, since the 4.0 release Maven is supported for the Swing release. SWT is not well supported by Maven so we didn't set that up (most SWT developers don't use Maven we speculate). For a description of using Maven to include Timing Framework Swing see Maven.

Why do SWT demos fail on Mac OS X with SWTException?

You also get the warning Display must be created on main thread due to Cocoa restrictions. This is a Mac only problem. You need to pass the argument -XstartOnFirstThread to the Java VM. I know this is annoying but there seems to be no other way. See the SWT FAQ entry on this issue.

Calling stop() or cancel() and then start() throws an IllegalArgumentException, What's up with that?

Yes, since the 5.1 release this could happen, prior to 5.1 stop semantics did not include waiting until all the callbacks on registered TimingTargets finished on a stop() or cancel(). Not doing this causes several subtle bugs if calls into a TimingTarget are very long running. The stop() and cancel() calls return immediately, but you need to call await() to be sure the animation has stopped. This only becomes a factor if you have code like:

Animator a;
...
a.stop();
a.start();
This snippet may fail with an IllegalStateException thrown during the call to start() because a is still stopping. To fix this you could use
a.stop();
try {
  a.await();
} catch(InterruptedException ignore) { }
a.start()
but this is a bit clunky so two convenience methods were added to Animator: stopAndAwait() and cancelAndAwait(). Thus you can use:
a.stopAndAwait();
a.start();
We really didn't want to make the stop() and cancel() calls block because most folks don't reuse Animator instances. if you create a new Animator instance each time you need one then you can "fire and forget" with stop() and cancel() (and not worry about stopAndAwait() and cancelAndAwait() which could block).

What happened to Chet Haase?

Chet Haase is well, but he is not involved day to day with this project, having passed the virtual baton along to Tim Halloran in March 2011. So don't bug him with your Timing Framework problems. You can see what Chet is up to by checking out his BLOG

Who is this Tim Halloran guy?

Tim Halloran is the current administrator of the Timing Framework project. Tim produced a port for Eclipse/SWT in 2009 and had virtual and real-world (JavaOne 2008) discussions with Chet about the project—in particular how to merge the Swing and SWT versions. At that time Chet, had moved from Sun to Adobe and Tim got busy finishing his Ph.D. at Carnegie Mellon, so little got accomplished. Time passed. In early 2011 Tim started working on an upgrade to a game he had developed called PlanetBaron and engineered a much improved version of the Timing Framework. "Well," Tim thought, "I should probably release this so that others can take advantage of the improvements I've made to Chet's code." So, after a long series of emails with Chet and Oracle he took over this project with the goal of releasing the improvements to the library.

In real life Tim is the Director of Engineering at SureLogic where he develops state-of-the-art analysis tools for Java. Tim was a technical reviewer for Josh Bloch's Effective Java (second edition).

Why won't code I copied out of Filthy Rich Clients compile?

Most likely you downloaded the Swing distribution of the Timing Framework. The interface to the Timing Framework has evolved since Filthy Rich Clients was published—August 2007 is a long time ago! You can download the classic distribution which maintains the API described in chapters 14-15 of the book. This is great if you are trying out the book's example code, but is not recommended if you are developing your own application. The changes to the Timing Framework are well motivated by problems noted by Chet and Tim in real-world use of the original code and the classic distribution is not well maintained.

 
 
Close
loading
Please Confirm
Close