Deadline Pressure Gauge

I made a few modifications to the gravy pressure gauge, and came up with this little hack. It's a pressure gauge that counts down time until some event as though the pressure were rising as the event gets closer. Here's one for tax day of 2008.

Stupid JavaTM Trick

Show your graduate students (or advisors) how high your stress level is. Show your boss how few resources you have available. The applications are endless.

In any case, it works the same way as the gravy pressure gauge, excpet that all the parameters for setting tick widths and number of ticks are ignored. See the gravy pressure gauge page for how to configure those parameters. A new parameter Deadline is defined, and is given of the form "Month date, year hour:minute:second am/pm". The specific format is a Java DateFormat. For example, the example above was generated by:

      <object codebase="/~faber/java/gravy" classid="java:Deadline.class" archive="gravy.jar"
      height=200 width=200>
      <param name="Background" value="ffffff">
      <param name="WarningColor" value="ff0000">
      <param name="NumLabels" value="2">
      <param name="Label1" value="Income">
      <param name="Label2" value="Tax">
      <param name="Deadline" value="April 15, 2008 11:59 pm">
      Stupid Java<sup><small>TM</small></sup> Trick</object>

You can leave off the time of day and abbreviate months.

The gauge rescales itself, so while an event is months or weeks away, the gauge will read in those units, going down to hours. It continuously updates, but only on a second frequency.

The Deadline class is included in the same jar file as the gravy pressure gauge. Feel free to play with them. The source and a jar file are available. Don't sell them in whole or in part without asking me. If you use them on your web pages, a link back here would be nice. And I always enjoy hearing that someone's using them.

This page written and maintained by Ted Faber.
Please mail me any problems with, or comments about this page.
Lunabase logo designed by and licensed from Roger Strunk
PGP Public Keys