All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.netobjects.nfx.wizard.WizardView

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----com.sun.java.swing.JDialog
                                           |
                                           +----com.netobjects.nfc.api.NFXJDialog
                                                   |
                                                   +----com.netobjects.nfx.wizard.WizardView

public class WizardView
extends NFXJDialog
implements ActionListener
This class is the view corrisponding to the wizard class which is the model portion. It takes care of creation, display and layout of UI controls etc... The controller is replaced by the java Observable/Observer mechanism.

The purpose for the model-view-controller approach is not just that it is good design practice but that we want the ability to load page objects into the wizard without initially creating all the expensive and numerous Swing UI controls. If the user gets only a couple of pages into the wizard and hits 'finish', all subsequent view pages will never get created.

Version:
1.0
Author:
Scott Cinnamond

Variable Index

 o dmBtnBack
 o dmBtnCancel
 o dmBtnFinish
 o dmBtnNext
 o dmButtonPanel
 o dmHeight
 o dmMainPanel
 o dmPagePanel
 o dmPagePanelCardLayout
 o dmWidth
 o dmWizard

Constructor Index

 o WizardView(Wizard, Frame, String)
Constructor.
 o WizardView(Wizard, Frame, String, int, int)
Constructor.

Method Index

 o actionPerformed(ActionEvent)
Process control events.
 o addPageView(String, WizardPageView)
Add the given view to the card layout panel.
 o createControls()
Create the UI controls.
 o enableFinish(boolean)
Enable the wizard 'finish' button.
 o enableNext(boolean)
Enable the wizard 'next' button.
 o enablePrevious(boolean)
Enable the wizard 'back' button.
 o getBackButton()
Returns the previous button.
 o getCancelButton()
Returns the cancel button.
 o getCardLayout()
Returns the card-layout for the wizard-view.
 o getExceptionHandler()
Returns the exception handler.
 o getFinishButton()
Returns the finish button.
 o getNextButton()
Returns the next button.
 o initialize()
Initialize the wiz.
 o removePageView(WizardPageView)
Remove the given view from the card layout.
 o showPageView(String)
Make the hashed page view corrisponding to the given id visible in the card layout.
 o windowClosing(WindowEvent)
Processes a window close event.

Variables

 o dmWizard
 private Wizard dmWizard
 o dmWidth
 private int dmWidth
 o dmHeight
 private int dmHeight
 o dmBtnBack
 private WizardView. WizardButton dmBtnBack
 o dmBtnNext
 private WizardView. WizardButton dmBtnNext
 o dmBtnFinish
 private WizardView. WizardButton dmBtnFinish
 o dmBtnCancel
 private WizardView. WizardButton dmBtnCancel
 o dmMainPanel
 private JPanel dmMainPanel
 o dmButtonPanel
 private JPanel dmButtonPanel
 o dmPagePanel
 private JPanel dmPagePanel
 o dmPagePanelCardLayout
 private CardLayout dmPagePanelCardLayout

Constructors

 o WizardView
 public WizardView(Wizard wizard,
                   Frame parent,
                   String title)
Constructor.

Parameters:
wizard - the wiz.
handler - the exception handler.
parent - the parent frame.
title - the title for the dialog.
 o WizardView
 public WizardView(Wizard wizard,
                   Frame parent,
                   String title,
                   int width,
                   int height)
Constructor.

Parameters:
wizard - the wiz.
handler - the exception handler.
parent - the parent frame.
title - the title for the dialog.
width - the view width in pixels.
height - the view height in pixels.

Methods

 o createControls
 private void createControls()
Create the UI controls.

 o getExceptionHandler
 public ExceptionHandler getExceptionHandler()
Returns the exception handler.

 o getCardLayout
 public CardLayout getCardLayout()
Returns the card-layout for the wizard-view.

 o getBackButton
 public JButton getBackButton()
Returns the previous button. @return the button.

 o getNextButton
 public JButton getNextButton()
Returns the next button. @return the button.

 o getFinishButton
 public JButton getFinishButton()
Returns the finish button. @return the button.

 o getCancelButton
 public JButton getCancelButton()
Returns the cancel button. @return the button.

 o initialize
 public void initialize() throws InternalError, ExternalError
Initialize the wiz.

 o addPageView
 public void addPageView(String id,
                         WizardPageView view)
Add the given view to the card layout panel.

Parameters:
id - the page unique id.
view - the page view.
 o removePageView
 public void removePageView(WizardPageView view)
Remove the given view from the card layout.

Parameters:
view - the page view.
 o showPageView
 public void showPageView(String id)
Make the hashed page view corrisponding to the given id visible in the card layout.

Parameters:
id - the page unique id.
 o enableNext
 public void enableNext(boolean enable)
Enable the wizard 'next' button.

Parameters:
enable - set enabled if true
 o enablePrevious
 public void enablePrevious(boolean enable)
Enable the wizard 'back' button.

Parameters:
enable - set enabled if true
 o enableFinish
 public void enableFinish(boolean enable)
Enable the wizard 'finish' button.

Parameters:
enable - set enabled if true
 o windowClosing
 public void windowClosing(WindowEvent event)
Processes a window close event.

Parameters:
event - the window event.
Overrides:
windowClosing in class NFXJDialog
 o actionPerformed
 public void actionPerformed(ActionEvent event)
Process control events.


All Packages  Class Hierarchy  This Package  Previous  Next  Index