com.denova.ui
Class WizardPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.denova.ui.WizardPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, com.denova.util.MessageListener, java.io.Serializable
Direct Known Subclasses:
StatusPanel

public class WizardPanel
extends javax.swing.JPanel
implements com.denova.util.MessageListener

Any time consuming work in either a WizardPanel constructor or the methods enter() and leave() must be spun off into another thread. If the new thread does Swing work with methods that are not thread safe, the code must use invokeLater() or invokeAndWait(). It can use invokeLater() directly or through Swinger, SwingWorker, etc.

Author:
DeNova Copyright © 1997-2008 DeNova All rights reserved worldwide.
See Also:
Serialized Form

Field Summary
static java.lang.Integer CancelButton
           
static java.lang.Integer NextButton
           
static java.lang.Integer NoDefault
           
static java.lang.Integer PreviousButton
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WizardPanel()
          WizardPanel constructor.
WizardPanel(javax.swing.JPanel panel, com.denova.util.PropertyList properties)
          WizardPanel constructor.
WizardPanel(javax.swing.JPanel panel, com.denova.util.PropertyList properties, com.denova.io.Log errorLog)
          Deprecated.  
WizardPanel(com.denova.util.PropertyList properties)
          To fully integrate a custom extension, create a class that extends WizardPanel.
WizardPanel(com.denova.util.PropertyList properties, com.denova.io.Log errorLog)
          Deprecated.  
 
Method Summary
 void abort()
          Abort the wizard.
 boolean ask(java.lang.String question)
          Pops up a dialog and asks the user a yes/no question.
 boolean ask(java.lang.String question, java.lang.String title, java.lang.String yesOption, java.lang.String noOption)
          Pops up a dialog and asks the user a yes/no question.
 void cancel()
          Cancel the wizard, if user confirms they want to do so.
 void enter()
          Called when the user enters this wizard panel.
 java.lang.String getCancelButtonIconName()
          Get custom icon name for the Cancel button.
 java.lang.String getCancelButtonLabel()
          Get custom text for the Cancel button.
 java.lang.Integer getDefaultButton()
          Sets default wizard button for this panel.
 java.lang.String getDefaultCancelButtonIconName()
          Get default icon name for the Cancel button.
 java.lang.String getDefaultFinishedButtonIconName()
          Get default icon name for the Finished button.
 java.lang.String getDefaultInstallButtonIconName()
          Get default icon name for the Install button.
 java.lang.String getDefaultNextButtonIconName()
          Get default icon name for the Next button.
 java.lang.String getDefaultPreviousButtonIconName()
          Get default icon name for the Back button.
 int getMostRecentPanelIndex()
          Returns the index of the panel that was active before the current panel.
 java.lang.String getMostRecentPanelName()
          Returns the name of the panel that was active before the current panel.
 java.lang.String getName()
          Called by the Wizard to get the name of this panel, used by showPanel(String).
 javax.swing.JButton getNextButton()
          Deprecated. See updateWizardButtons().
 boolean getNextButtonExists()
          Returns whether Next button exists on this panel.
 java.lang.String getNextButtonIconName()
          Get custom icon name for the Next button.
 java.lang.String getNextButtonLabel()
          Get custom text for the Next button.
 int getPanelIndex()
          Returns the index of the active panel.
 javax.swing.JButton getPreviousButton()
          Deprecated. See updateWizardButtons().
 boolean getPreviousButtonExists()
          Returns whether Back button exists on this panel.
 java.lang.String getPreviousButtonIconName()
          Get custom icon name for the Back button.
 java.lang.String getPreviousButtonLabel()
          Get custom text for the Back button.
 com.denova.util.PropertyList getPropertyList()
          Returns the list of properties available during the installation.
 void gotMessage(java.lang.Object source, java.lang.Object message)
          This is just a placeholder so subclasses can override it, instead of trying to add a listener before the wizard has been set.
 boolean isAix()
          Returns true if operating on AIX
 boolean isCancelButtonEnabled()
          Returns whether the Cancel button is enabled.
 boolean isCurrentPanel()
          Returns if this is the current panel showing in the wizard.
 boolean isEnabled()
          Returns whether this panel is enabled.
 boolean isHpUnix()
          Returns true if operating on HP's Unix
 boolean isLinux()
          Returns true if operating on Linux
 boolean isMac()
          Returns true if operating on Mac OS
 boolean isMacOsX()
          Returns true if operating on Mac OS X
 boolean isMpeUnix()
          Returns true if operating on MPE/iX
 boolean isNetware()
          Returns true if operating on Netware
 boolean isNextButtonEnabled()
          Returns whether the Next button is enabled.
 boolean isOk()
          Called by the Wizard to check whether this panel is ok, when the user click on Next.
 boolean isOs2()
          Returns true if operating on OS/2
 boolean isPreviousButtonEnabled()
          Returns whether the Back button is enabled.
 boolean isSolaris()
          Returns true if operating on Solaris
 boolean isUnix()
          Returns true if operating on Unix
 boolean isWindows()
          Returns true if operating on any variant of Windows
 boolean isWindows2000()
          Returns true if operating on Windows 2000
 boolean isWindows95()
          Returns true if operating on Windows 95
 boolean isWindows98()
          Returns true if operating on Windows 98
 boolean isWindowsNT()
          Returns true if operating on Windows NT
 boolean isWindowsXP()
          Returns true if operating on Windows XP
 void leave()
          Called when the user leaves this wizard panel.
 void note(java.lang.String message)
          Display a message in a dialog box until the user clicks Ok button.
 void note(java.lang.String[] message)
          Display a multiline message in a dialog box until the user clicks Ok.
 void note(java.lang.String message, java.lang.String okMessage)
          Display a message in a dialog box until the user clicks OkMessage button.
 void reset()
          reset is called whenever a panel calls resetPanel ( panelName );.
 boolean resetPanel(java.lang.String name)
          Resets the named panel to its original settings.
 void setActive(boolean active)
          Deprecated. Use enter() and leave() instead.
 void setCancelButtonEnabled(boolean enabled)
          Sets whether the Cancel button is enabled.
 void setDefaultButton(java.lang.Integer button)
          Sets default wizard button for this panel.
 void setDefaultFinishedButtonIconName(java.lang.String newIconName)
          Set default icon name for the Finished button.
 void setEnabled(boolean e)
          Sets whether this panel is enabled.
 void setEnabledNamedPanel(java.lang.String name, boolean b)
          Enable/Disable the panel with the matching name.
 void setNextButtonEnabled(boolean enabled)
          Sets whether the Next button is enabled.
 void setPreviousButtonEnabled(boolean enabled)
          Sets whether the Previous button is enabled.
 void setPropertyList(com.denova.util.PropertyList properties)
          Sets properties used during the installation.
 void setWizard(com.denova.ui.Wizard wiz)
          Called by the Wizard class when a panel is added.
 void showNextPanel()
          Displays the next panel without the user clicking the Next button.
 void showPanel(int i)
          Displays a particular panel.
 void showPanel(java.lang.String name)
          Moves to a named panel.
 void showPreviousPanel()
          Displays the previous panel without the user clicking the Back button.
 void userCanceled()
          Called by the Wizard to notify this panel when the user cancels the wizard.
 javax.swing.JButton wizardGetDefaultButton()
          Returns default button for this panel, or null if none.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NoDefault

public static final java.lang.Integer NoDefault

PreviousButton

public static final java.lang.Integer PreviousButton

NextButton

public static final java.lang.Integer NextButton

CancelButton

public static final java.lang.Integer CancelButton
Constructor Detail

WizardPanel

public WizardPanel(com.denova.util.PropertyList properties)
To fully integrate a custom extension, create a class that extends WizardPanel.

WizardPanel is a JPanel, so you add components in the constructor, as is the norm with Swing, not in addnotify. Store your custom class in the JExpressInstaller subdirectory so it will be available during the installation.

Your constructor must pass a couple of parameters to the WizardPanel's constructor. It can do more if you like, but this is the minimum. Treat the "PropertyList" parameter to the constructor as an instance of Properties.

WizardPanel is a class which is never instantiated directly, but is extended by all wizard panels. The constructor of all WizardPanels is called at the beginning of the application so constructors should do screen layouts and little else. All other code should be called from inside the enter leave methods.

Parameters:
properties - program's properties

WizardPanel

public WizardPanel(com.denova.util.PropertyList properties,
                   com.denova.io.Log errorLog)
Deprecated.  

WizardPanel constructor.

Parameters:
properties - program's properties
errorLog - (ignored)

WizardPanel

public WizardPanel(javax.swing.JPanel panel,
                   com.denova.util.PropertyList properties)
WizardPanel constructor.

Parameters:
panel - jpanel to be added to this wizard panel.
properties - program's properties

WizardPanel

public WizardPanel(javax.swing.JPanel panel,
                   com.denova.util.PropertyList properties,
                   com.denova.io.Log errorLog)
Deprecated.  

WizardPanel constructor.

Parameters:
panel - jpanel to be added to this wizard panel.
properties - program's properties
errorLog - (ignored)

WizardPanel

public WizardPanel()
WizardPanel constructor.

Method Detail

setActive

public void setActive(boolean active)
Deprecated. Use enter() and leave() instead.

Deprecated. Use enter() and leave() instead.

This method is called whenever your WizardPanel becomes active or inactive.

When the parameter "active" is true your panel has control. You can then interact with the user or take almost any other action you like. Before setActive is called and whenever the parameter "active" is false your panel is not visible and should not take any action in the current thread. You can always start another thread if you like, but be certain it's not dependent on any of your components being visible.

Active is set to true when your panel is called from showPanel(), showNextPanel(), or showPreviousPanel(). When your panel calls showPanel(), showNextPanel(), or showPreviousPanel(), then active is set to false. Be sure to start another thread if you want your panel to do something when active is set to false.

Important: You should not call setActive() from your custom panel and you should not change the state of active.

See the RegisterPanel.java for an example of this method. See the ExampleCommand.java for an example of starting another thread from a custom panel.

Parameters:
active - new active

enter

public void enter()
Called when the user enters this wizard panel. This method is called from the Swing Event Dispatch Thread, so you can safely access Swing compnents. If you are doing anything that takes a long time, use SwingWorker or Swinger to spin off a thread. Do not call this method; only the wizard should call it.


leave

public void leave()
Called when the user leaves this wizard panel. This method is called from the Swing Event Dispatch Thread, so you can safely access Swing components. If you are doing anything that takes a long time, use SwingWorker or Swinger to spin off a thread. The wizard will not let the user (or unattended build) leave the panel until isOk() returns true. Do not call this method; only the wizard should call it.


setPropertyList

public void setPropertyList(com.denova.util.PropertyList properties)
Sets properties used during the installation.

To set a particular property in the list, then use setPropertyList (). setProperty ( "propertyName", "property" ); where "propertyName" is replaced with the name of the property and "property" is replaced with the value of the property

See DeleteMenuItemsPanel.java for an example of this method.

Parameters:
properties - new property list

setEnabled

public void setEnabled(boolean e)
Sets whether this panel is enabled.

If this panel is not enabled, the Wizard will skip it

Overrides:
setEnabled in class javax.swing.JComponent
Parameters:
e - new enabled

setEnabledNamedPanel

public void setEnabledNamedPanel(java.lang.String name,
                                 boolean b)
Enable/Disable the panel with the matching name.

If the boolean value is true, then enable the panel. Otherwise, disable it.

A full list of the standard panels is here.

Parameters:
name - new enabled named panel
b - new enabled named panel

setWizard

public void setWizard(com.denova.ui.Wizard wiz)
Called by the Wizard class when a panel is added. It should *never* be called from a custom panel derived from WizardPanel.

Parameters:
wiz - new wizard

getPropertyList

public com.denova.util.PropertyList getPropertyList()
Returns the list of properties available during the installation.

To get a particular property from the list, then use getPropertyList (). getProperty ( "propertyName" [, ""] ); where "propertyName" is replaced with the name of the property. The second parameter to getProperty is the default if the property doesn't exist.

See VersionPanel.java for an example of this method.

Returns:
property list

wizardGetDefaultButton

public javax.swing.JButton wizardGetDefaultButton()
Returns default button for this panel, or null if none. This is called by Wizard. Panels should not use it to get a JButton instance.

Returns:
default button

getDefaultButton

public java.lang.Integer getDefaultButton()
Sets default wizard button for this panel.


setDefaultButton

public void setDefaultButton(java.lang.Integer button)
Sets default wizard button for this panel.


getPreviousButtonExists

public boolean getPreviousButtonExists()
Returns whether Back button exists on this panel.

Returns:
previous button exists

getNextButtonExists

public boolean getNextButtonExists()
Returns whether Next button exists on this panel.

Returns:
next button exists

getPreviousButtonLabel

public java.lang.String getPreviousButtonLabel()
Get custom text for the Back button.

Returns:
previous button label, or null for the default

getNextButtonLabel

public java.lang.String getNextButtonLabel()
Get custom text for the Next button.

See ExampleWizardPanel.java for an example of this method.

Returns:
next button label

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Get custom text for the Cancel button.

Returns:
cancel button label

getPreviousButtonIconName

public java.lang.String getPreviousButtonIconName()
Get custom icon name for the Back button.

Returns:
previous button icon name

getNextButtonIconName

public java.lang.String getNextButtonIconName()
Get custom icon name for the Next button.

Returns:
next button icon name

getCancelButtonIconName

public java.lang.String getCancelButtonIconName()
Get custom icon name for the Cancel button.

Returns:
cancel button icon name

getDefaultPreviousButtonIconName

public java.lang.String getDefaultPreviousButtonIconName()
Get default icon name for the Back button. This is a convenience method that calls wizard.getDefaultPreviousButtonIconName().

Returns:
default previous button icon name

getDefaultNextButtonIconName

public java.lang.String getDefaultNextButtonIconName()
Get default icon name for the Next button. This is a convenience method that calls wizard.getDefaultNextButtonIconName().

Returns:
default next button icon name

getDefaultCancelButtonIconName

public java.lang.String getDefaultCancelButtonIconName()
Get default icon name for the Cancel button. This is a convenience method that calls wizard.getDefaultCancelButtonIconName().

Returns:
default cancel button icon name

getDefaultFinishedButtonIconName

public java.lang.String getDefaultFinishedButtonIconName()
Get default icon name for the Finished button. This is a convenience method that calls wizard.getDefaultFinishedButtonIconName().

Returns:
default finished button icon name

setDefaultFinishedButtonIconName

public void setDefaultFinishedButtonIconName(java.lang.String newIconName)
Set default icon name for the Finished button.


getDefaultInstallButtonIconName

public java.lang.String getDefaultInstallButtonIconName()
Get default icon name for the Install button. This is a convenience method that calls wizard.getDefaultInstallButtonIconName().

Returns:
default install button icon name

isOk

public boolean isOk()
Called by the Wizard to check whether this panel is ok, when the user click on Next.

The Wizard will not move to the next or previous panel until this method returns true.

Important: Do *not* call any method that will change the panel being displayed (e.g., showPanel(), showNextPanel(), etc.) from within isOk().

Returns:
ok

getName

public java.lang.String getName()
Called by the Wizard to get the name of this panel, used by showPanel(String).

To show this panel from other panels by name instead of index, you must return this panel's name from this method.

Overrides:
getName in class java.awt.Component
Returns:
name

getNextButton

public final javax.swing.JButton getNextButton()
Deprecated. See updateWizardButtons().

Allows you to make dynamic changes to the Next button's text, enabled state, etc.

Example: getNextButton().setEnabled(false).

Returns:
next button

getPreviousButton

public final javax.swing.JButton getPreviousButton()
Deprecated. See updateWizardButtons().

Lets you make dynamic changes to the Back button's text, enabled state, etc.

Example: getPreviousButton().setEnabled(false).

Returns:
previous button

isNextButtonEnabled

public boolean isNextButtonEnabled()
Returns whether the Next button is enabled.

Returns:
next button enabled

setNextButtonEnabled

public void setNextButtonEnabled(boolean enabled)
Sets whether the Next button is enabled.

Parameters:
enabled - next button enabled

isPreviousButtonEnabled

public boolean isPreviousButtonEnabled()
Returns whether the Back button is enabled.

Returns:
previous button enabled

setPreviousButtonEnabled

public void setPreviousButtonEnabled(boolean enabled)
Sets whether the Previous button is enabled.

Parameters:
enabled - previous button enabled

isCancelButtonEnabled

public boolean isCancelButtonEnabled()
Returns whether the Cancel button is enabled.

Returns:
cancel button enabled

setCancelButtonEnabled

public void setCancelButtonEnabled(boolean enabled)
Sets whether the Cancel button is enabled.

Parameters:
enabled - cancel button enabled

isCurrentPanel

public final boolean isCurrentPanel()
Returns if this is the current panel showing in the wizard.

Returns:
true iff this is the current panel

getMostRecentPanelIndex

public final int getMostRecentPanelIndex()
Returns the index of the panel that was active before the current panel. Note that this panel may not be the current panel. See isCurrentPanel().

Returns:
most recent panel index

getMostRecentPanelName

public final java.lang.String getMostRecentPanelName()
Returns the name of the panel that was active before the current panel. Note that this panel may not be the current panel. See isCurrentPanel().

Returns:
most recent panel name

getPanelIndex

public final int getPanelIndex()
Returns the index of the active panel.

Returns:
panel index

isEnabled

public boolean isEnabled()
Returns whether this panel is enabled.

Overrides:
isEnabled in class java.awt.Component
Returns:
enabled

isWindows

public boolean isWindows()
Returns true if operating on any variant of Windows

Returns:
windows

isWindows2000

public boolean isWindows2000()
Returns true if operating on Windows 2000

Returns:
windows2000

isWindowsNT

public boolean isWindowsNT()
Returns true if operating on Windows NT

Returns:
windows NT

isWindows98

public boolean isWindows98()
Returns true if operating on Windows 98

Returns:
windows98

isWindows95

public boolean isWindows95()
Returns true if operating on Windows 95

Returns:
windows95

isWindowsXP

public boolean isWindowsXP()
Returns true if operating on Windows XP

Returns:
windows XP

isUnix

public boolean isUnix()
Returns true if operating on Unix

Returns:
unix

isLinux

public boolean isLinux()
Returns true if operating on Linux

Returns:
linux

isAix

public boolean isAix()
Returns true if operating on AIX

Returns:
aix

isHpUnix

public boolean isHpUnix()
Returns true if operating on HP's Unix

Returns:
hp unix

isSolaris

public boolean isSolaris()
Returns true if operating on Solaris

Returns:
solaris

isMac

public boolean isMac()
Returns true if operating on Mac OS

Returns:
mac

isMacOsX

public boolean isMacOsX()
Returns true if operating on Mac OS X

Returns:
mac os x

isOs2

public boolean isOs2()
Returns true if operating on OS/2

Returns:
os2

isNetware

public boolean isNetware()
Returns true if operating on Netware

Returns:
netware

isMpeUnix

public boolean isMpeUnix()
Returns true if operating on MPE/iX

Returns:
mpe unix

reset

public void reset()
reset is called whenever a panel calls resetPanel ( panelName );.

If your panel can normally only be activated one time during the operation of the wizard, but there are circumstances when you want to activate it a 2nd time, then define this function in your custom panel so it reconfigures the panel to allow it to be activated again.


userCanceled

public void userCanceled()
Called by the Wizard to notify this panel when the user cancels the wizard. The wizard has already been made invisible so there should be no user interaction in this method. If you want to take some special action when the user cancels, then you should include this method with the special action code.


cancel

public void cancel()
Cancel the wizard, if user confirms they want to do so.

Stops the wizard after notifying all panels that we're cancelling.


abort

public void abort()
Abort the wizard.

Stops the wizard without notifying the user or other panels.


showPanel

public void showPanel(int i)
Displays a particular panel.

showPanel() is the equivilant of executing a "goto" which is generally a more troublesome design to support. You might see if enabling and disabling specific panels with the setEnabledNamedPanel() method will meet your needs and allow you to let the wizard manage the forward and backward flow automatically.

You should only call showPanel() from enter(). Invoking showPanel() does not end execution of your code. However remember that after successfully calling showPanel(), another panel is now active, so you probably don't want to do anything else until enter() is called again.

i is the index for the panel. The first index is 0 and corresponds to the order the panels display during the installation. Because this order may change, showPanel(panelName) is better.

For example, if you had the following panels to display in your installer:

   Before install: Custom1 Custom2
   After license: Custom3
   After readme: Custom4 Custom5
   After uninstaller: Custom6

and you have a license and readme file specified, then here's the order of the panels:

   0: Custom1
   1: Custom2
   2: Welcome message
   3: License
   4: Custom3
   5: Readme
   6: Custom4
   7: Custom5
   8: Installation directory
   9: Custom6
   10: Finished

So you could move to Custom5 by calling showPanel(7) or Custom2 by calling showPanel(8).

Parameters:
i - panel number

showPanel

public void showPanel(java.lang.String name)
Moves to a named panel.

The panel name must be returned by getName() in the target panel's class. Each of the panels automatically created by the installer have names so you can move to them using this version of showPanel(). Here are the names assigned to each of the standard panels in the installer.

See the showPanel(int) method for more details.

Parameters:
name - panel name

resetPanel

public boolean resetPanel(java.lang.String name)
Resets the named panel to its original settings.

You only need to call this method if the named panel normally should only be called one time during the normal wizard's operation.

The name must be returned by getName() in the target panel.

For example, the standard InstallFilesPanel can only be called one time during an installation, unless you call resetPanel ( "InstallFilesPanel") before calling showPanel ( "InstallFilesPanel" )

Parameters:
name - panel name
Returns:
true if the named panel exists

showPreviousPanel

public void showPreviousPanel()
Displays the previous panel without the user clicking the Back button.

You should only call showPreviousPanel() if your custom panel does not interact with the user. If your panel waits for the user to click the Next or Back buttons, then you probably do not need, nor want, to call this method.


showNextPanel

public void showNextPanel()
Displays the next panel without the user clicking the Next button.

You should only call showNextPanel() if your custom panel does not interact with the user. If your panel waits for the user to click the Next or Back buttons, then you probably do not need, nor want, to call this method.

See the VersionPanel.java for an example of this method.


ask

public boolean ask(java.lang.String question)
Pops up a dialog and asks the user a yes/no question.

Parameters:
question - a question that has a yes/no answer.
Returns:
true for yes, false for no.

ask

public boolean ask(java.lang.String question,
                   java.lang.String title,
                   java.lang.String yesOption,
                   java.lang.String noOption)
Pops up a dialog and asks the user a yes/no question. Returns

Parameters:
question - displayed in the dialog box
title - displayed in the title bar
yesOption - label for the "yes" answer
noOption - label for the "no" answer
Returns:
true for yesOption clicked, otherwise false.

note

public void note(java.lang.String message)
Display a message in a dialog box until the user clicks Ok button.

Parameters:
message - message in a dialog box.

note

public void note(java.lang.String message,
                 java.lang.String okMessage)
Display a message in a dialog box until the user clicks OkMessage button.

Parameters:
message - message in the dialog box
okMessage - label for the "ok" button

note

public void note(java.lang.String[] message)
Display a multiline message in a dialog box until the user clicks Ok.

Parameters:
message - multiline message in a dialog box

gotMessage

public void gotMessage(java.lang.Object source,
                       java.lang.Object message)
This is just a placeholder so subclasses can override it, instead of trying to add a listener before the wizard has been set.

Specified by:
gotMessage in interface com.denova.util.MessageListener