I have written a java widget that is a timeline that is painted with events representing a capture stream (say video) and associated events (say keyword locations). The widget is called the Multi-Scale Timeline Widget (MTS). The widget provides infinite zooming and control. It is a very dumb, general widget meant to run with any set of streams, events, etc. Thus, it requires a driver program to create the data and control MTS and get events from MTS.
Please see http://c2000.cc.gatech.edu/mts for a better explanation of the widget as well as an example program using it.
You can run another example at http://fce.c.gatech.edu/saampad/SAAMPlayer/SAAMPlayerApplet.html
My current work is in http://fce.cc.gatech.edu/saampad/MTSSearch/MTSSearch.html (thus, this is likely to be volatile and not working occasionally)
(I've only ever tested these on a Windows95 and Windows98 machine in Netscape, they also require the RealPlayer)
You can get the code at ~hrichter/public/MTS. All the java and class files are there. I don't currently have a driver program there.
The widget consists of:
The data classes MTS uses are in the following:
Thus, the main file is MTS.java. This contains all the code for drawing and maintaining what you see on the screen.
My first question: how do you test such a thing along the refactoring lines with simple tests? What kind of driver program would be necessary? How do you return "okay" for things like resizing and repainting properly. (My main bugs previously were blinking, wrong colored backgrounds, etc) Performance is an issue in this widget as well. The whole drawing scheme is done so as to eliminate blinking.
So, this was meant to be a VERY general widget. As such, I'd like to be able to customize and add bits and pieces. Thus, it would be nice to have MTS as a parent and be able to subclass off of it maybe. Or just make things easier to add and remove. I'm still the only person using it though so my interfaces are unpublished, but would still like to minimize changes to already existing examples.
As examples of the changes I will be making in order of importance (the top two will be done this week - albeit hacked into the code messily):