Oracle JEWT 4.2.10

oracle.bali.ewt.wizard
Class WizardDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--oracle.bali.ewt.wizard.WizardDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class WizardDialog
extends javax.swing.JDialog

The WizardDialog class provides a simple way of running a wizard in a dialog until the user either cancels or finishes the wizard. It doesn't handle any of the issues of page navigation and validation; clients should interact directly with the Wizard for these issues.

The WizardDialog also doesn't reset the currently visible page each time it's run; that is also the client's responsibility.

It is legal to use the same wizard in multiple WizardDialogs, but only one of those dialogs must be running at a time.

See Also:
BaseWizard, Serialized Form

Inner classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Inner classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WizardDialog()
          Creates a modal WizardDialog without an embedded wizard.
WizardDialog(BaseWizard wizard)
          Creates a modal WizardDialog without a specified parent frame.
WizardDialog(BaseWizard wizard, java.awt.Dialog parent)
          Creates a modal WizardDialog.
WizardDialog(BaseWizard wizard, java.awt.Dialog parent, boolean modal)
          Creates a WizardDialog.
WizardDialog(BaseWizard wizard, java.awt.Frame parent)
          Creates a modal WizardDialog.
WizardDialog(BaseWizard wizard, java.awt.Frame parent, boolean modal)
          Creates a WizardDialog.
 
Method Summary
protected  void dismissDialog(boolean cancelled)
          Hides the dialog.
 void dispose()
          Override to free more memory.
 java.awt.Component getCenterOver()
          Returns the component over which the wizard will be centered.
 java.util.Locale getLocale()
          Returns the locale of the wizard.
 java.awt.Dimension getPreferredSize()
          Return the preferredSize of the wizard.
 BaseWizard getWizard()
          Returns the wizard used by the dialog.
 java.lang.String getWizardTitle()
          Gets the base title for the wizard.
 boolean isCancelled()
          Returns true if the dialog was cancelled from its last run.
 boolean isFinishPageIncluded()
          Get if a finish page is included in the set of wizard pages in the wizard.
 boolean isWelcomePageIncluded()
          Get if a welcome page is included in the set of wizard pages in the wizard.
protected  void processComponentEvent(java.awt.event.ComponentEvent e)
          Override to not allow resizing smaller than initial size.
protected  void processWindowEvent(java.awt.event.WindowEvent e)
          Processes window events occurring on this window.
 boolean runDialog()
          Runs the wizard in this dialog until it is either cancelled or finishes succesfully.
 void setCenterOver(java.awt.Component centerOver)
          Sets the component over which the wizard will be centered.
 void setFinishPageIncluded(boolean finishPage)
          Set if a finish page is included in the set of wizard pages in the wizard.
 void setLocale(java.util.Locale locale)
          Sets the locale of the wizard.
 void setWelcomePageIncluded(boolean welcomePage)
          Set if a welcome page is included in the set of wizard pages in the wizard.
 void setWizard(BaseWizard wizard)
          Sets the wizard used by the dialog.
 void setWizardTitle(java.lang.String wizardTitle)
          Sets the base title for the wizard.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, setModal, setResizable, setTitle, show
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WizardDialog

public WizardDialog()
Creates a modal WizardDialog without an embedded wizard.

WizardDialog

public WizardDialog(BaseWizard wizard)
Creates a modal WizardDialog without a specified parent frame.
Parameters:
wizard - the embedded wizard.

WizardDialog

public WizardDialog(BaseWizard wizard,
                    java.awt.Frame parent)
Creates a modal WizardDialog.
Parameters:
wizard - the embedded wizard.
parent - the parent frame.

WizardDialog

public WizardDialog(BaseWizard wizard,
                    java.awt.Frame parent,
                    boolean modal)
Creates a WizardDialog.
Parameters:
wizard - the embedded wizard.
parent - the parent frame.
modal - true for modal, false for nonmodal

WizardDialog

public WizardDialog(BaseWizard wizard,
                    java.awt.Dialog parent)
Creates a modal WizardDialog.
Parameters:
wizard - the embedded wizard.
parent - the parent dialog.

WizardDialog

public WizardDialog(BaseWizard wizard,
                    java.awt.Dialog parent,
                    boolean modal)
Creates a WizardDialog.
Parameters:
wizard - the embedded wizard.
parent - the parent frame.
modal - true for modal, false for nonmodal
Method Detail

getWizard

public BaseWizard getWizard()
Returns the wizard used by the dialog.

setWizard

public void setWizard(BaseWizard wizard)
Sets the wizard used by the dialog.

setWizardTitle

public void setWizardTitle(java.lang.String wizardTitle)
Sets the base title for the wizard. If the wizardTitle is non null than the WizardDialog will automatically set the title of the WizardDialog to match the Oracle Wizard User Interface specification for titles.

getWizardTitle

public java.lang.String getWizardTitle()
Gets the base title for the wizard. If the wizardTitle is non null than the WizardDialog will automatically set the title of the WizardDialog to match the Oracle Wizard User Interface specification for titles.

setWelcomePageIncluded

public void setWelcomePageIncluded(boolean welcomePage)
Set if a welcome page is included in the set of wizard pages in the wizard. If welcomePage is true and getWizardTitle() is non null than the title of the WizardDialog when the first page is selected will automatically conform to the Oracle Wizard User Interface spec instructions on the title of the welcome page.

isWelcomePageIncluded

public boolean isWelcomePageIncluded()
Get if a welcome page is included in the set of wizard pages in the wizard. If welcomePageIncluded is true and getWizardTitle() is non null than the title of the WizardDialog when the first page is selected will automatically conform to the Oracle Wizard User Interface spec instructions on the title of the welcome page.

setFinishPageIncluded

public void setFinishPageIncluded(boolean finishPage)
Set if a finish page is included in the set of wizard pages in the wizard. If finishPage is true and getWizardTitle() is non null than the title of the WizardDialog when the last page is selected will automatically conform to the Oracle Wizard User Interface spec instructions on the title of the finish page.

isFinishPageIncluded

public boolean isFinishPageIncluded()
Get if a finish page is included in the set of wizard pages in the wizard. If finishPageIncluded is true and getWizardTitle() is non null than the title of the WizardDialog when the last page is selected will automatically conform to the Oracle Wizard User Interface spec instructions on the title of the finish page.

isCancelled

public boolean isCancelled()
Returns true if the dialog was cancelled from its last run. If the dialog is currently visible, always returns false.

getCenterOver

public java.awt.Component getCenterOver()
Returns the component over which the wizard will be centered.

setCenterOver

public void setCenterOver(java.awt.Component centerOver)
Sets the component over which the wizard will be centered.

runDialog

public boolean runDialog()
Runs the wizard in this dialog until it is either cancelled or finishes succesfully. If the WizardDialog is non modal than clients can either add a WizardListener to the BaseWizard and listen for wizardCanceled() or wizardFinished() events or clients can subclass WizardDialog and override dismissDialog() to find out if the user pressed finish or cancel.
Returns:
false if the wizard was cancelled, true if it finished succesfully. For non-modal dialogs, always returns true.
Throws:
java.lang.IllegalStateException - if the wizard has a parent already, or the dialog is already visible.

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale of the wizard.
Overrides:
setLocale in class java.awt.Component

getLocale

public java.util.Locale getLocale()
Returns the locale of the wizard.
Overrides:
getLocale in class java.awt.Window

getPreferredSize

public java.awt.Dimension getPreferredSize()
Return the preferredSize of the wizard.
Overrides:
getPreferredSize in class java.awt.Container

dispose

public void dispose()
Override to free more memory.
Overrides:
dispose in class java.awt.Dialog

dismissDialog

protected void dismissDialog(boolean cancelled)
Hides the dialog.
Parameters:
cancelled - true if the cancel button was pressed, false if the finish button was pressed.

processComponentEvent

protected void processComponentEvent(java.awt.event.ComponentEvent e)
Override to not allow resizing smaller than initial size.
Overrides:
processComponentEvent in class java.awt.Component

processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent e)
Processes window events occurring on this window.
Overrides:
processWindowEvent in class javax.swing.JDialog
Parameters:
e - the window event

Oracle JEWT 4.2.10