Java Reference
In-Depth Information
kept abreast of the progress through the entire process, showing which tasks have
been completed and which are pending.
Figure 12.7 shows a typical wizard display. At the top is a progress indicator; the
current task is highlighted and the remaining tasks appear to the right in sequen-
tial order. In the middle of the display is the user input area. At the bottom are
areas for three buttons: Back, Next, and Cancel. In Figure12.7, the Back button
is not shown as the wizard is on the first task and there is no previous task.
Figure 12.7
Wizard - First Task
To implement the wizard pattern in JavaFX, we have created a Wizard class that
controls the display of all the tasks defined for the wizard. This class uses the
WizardItem class that defines the individual displays used by each task. The
Wizard class contains an instance variable, currentItem , that defines the dis-
played item represented by a WizardItem object. The instance variable, tasks ,
is a sequence of the task names that are displayed in the progress indicator at the
top of the window. Each WizardItem contains an instance variable, taskId , that
Search WWH ::




Custom Search