Help Your Shelf (waiting dialog for Swing)

You can run the WebStart demo or, as usual, download its source code. Run the demo, seriously guys :)

Since many people liked the Follow The Curves demo, I decided to extend it. I am using the same kind of design to show a waiting dialog. This dialog is shown after the login screen and should typically be displayed when the application contacts a remote authentication server. The transition between the two screen is animated with a fade in/fade out effect:

On the contrary to the previous demo, this is a real, full Swing, login form. Just press Enter to proceed to the next step. You then reach a new screen showing an animation while the application is supposed to performing some long networked task:

As said before, the transition between both screens is implemented with a fade in/out effect, as you can see in this intermediary screenshot:

This screen is a new variation of the first one. There is still one animated curve at the top, but it shows scrolling lines of circles. The lines can move in either horizontal direction. This time, the API is much more simpler:

private void drawCircles(Graphics2D g2,
  float y, float diameter, float gap,
  float speed, boolean invertDirection, boolean invertGradient);

// example
drawCircles(g2, 40.0f, 24.0f, 12.0f, 2.0f, false, false);

The parameters are pretty self explanatory. Note that even though the speed is defined as a float value you really want to use an integer. If you don't, you'll get nasty artifacts. I need to change the scrolling algorithm to fix this issue. Finally, you can notice that the text glows:

The code is still a mess but before cleaning it up I'd really like to create an application with this style. I'm afraid I'll have a lot of UI delegates to write. (Or at least many paint methods to override :) Enjoy!

Comments are closed.