BWS42: Programs
Home Programs
Original Fruity Steel High Contrast Dark

Get Firefox

Valid XHTML 1.0!

Valid CSS!

Wizard Framework

This framework is designed to make it easy for a user to be lead through a series of steps with multiple paths possible depending on the user's input. It is not very feature rich as my focus was on creating a simple framework that I could reuse for my own programs and possibly ones I made for friends. I believe it is simple and intuitive to use and I hope that you find that it is as well.

The main feature is how it uses a factory to determine which panel to show next based upon the contents of a wizard object that gets passed from one panel to the next. All wizard objects have a position that is automatically incremented or decremented as the user presses next or previous. This allows you to provide a basic, linear wizard solely by returning panels based on the position. If you want something more complicated than that you can make your factory as complex as you'd like. I should also mention that if an exception is thrown trying to set the wizard object on a new panel when the user clicks next then the wizard will remain at its current location. If the error occurs when the user clicks previous then the wizard will decrement the position as many times as needed in order to get a panel that works.

Another cool feature is how the framework can handle translations. When you create the wizard you are required to pass in a Locale which is used to display translations of the next and previous buttons. What level of translation your wizard supports is up to you, but you can potentially have complete translations and the ability to switch between them at runtime. As an example you can look at MetFileRegenerator.

I originally decided to make the framework when I was creating MetFileRegenerator v3.0 a couple years ago. From my experience trying to help users using the previous versions it was quite evident that there needed to be a simple step by step manner of inputting the needed data and then performing a process based on that data. I'm not saying that using this framework will make your application foolproof, but I can safely say that it did significantly improve the experience of my program.