com.denova.JExpress.Installer
Class StatusPanel

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

public class StatusPanel
extends WizardPanel
implements com.denova.JExpress.Installer.InstallerConstants, com.denova.util.MessageListener

StatusPanel gives the various custom classes that run after the files are installed the same look. Ideally all StatusPanels appear to be a single panel that is simply updated with the status.

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

Field Summary
 
Fields inherited from class com.denova.ui.WizardPanel
CancelButton, NextButton, NoDefault, 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 com.denova.JExpress.Installer.InstallerConstants
NoticeFont, SmallFont, TitleFont
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
StatusPanel(com.denova.util.PropertyList properties)
          A custom class which has no user interaction can inherit from StatusPanel instead of WizardPanel, if you'd like.
StatusPanel(com.denova.util.PropertyList properties, com.denova.io.Log errorLog)
          Deprecated.  
 
Method Summary
protected  java.lang.String getLocalizedString(java.lang.String key)
           
protected  java.lang.String getLocalizedString(java.lang.String key, java.lang.String variable)
           
 void gotMessage(java.lang.Object source, java.lang.Object message)
          Called when a message is sent to this panel.
 void incrementProgressBar()
          Increment the progress bar a small amount.
 void incrementProgressBar(int increment)
          Increment the progress bar a small amount.
 boolean isCancelButtonEnabled()
          Disables the cancel button.
 boolean isNextButtonEnabled()
          Disables the next button.
 boolean isPreviousButtonEnabled()
          Disables the back button.
static boolean isSmooth()
          Returns the value of smooth.
 void pauseProgressBar()
          Pause the automatic progress bar.
 void setLabels(java.lang.String lowerStatus)
          Set the lower status message.
 void setLabels(java.lang.String upperStatus, java.lang.String lowerStatus)
          Set the upper and lower status messages.
 void setLabels(java.lang.String upperStatus, java.lang.String lowerStatus, java.lang.String progressBarStatus)
          Set the status messages.
static void setSmooth(boolean newSmooth)
          Sets smoothing.
 void showNextPanel()
          Displays the next panel without the user clicking the Next button.
 void startProgressBar()
          Start an automatic progress bar so the user knows the installer's working.
 void stopProgressBar()
          Stop the automatic progress bar.
 void updateLowerStatusLabel(java.lang.String status)
          Set the text in the second label.
 void updateProgressBar(int percent)
          Update the percentage of the status bar which should be filled.
 void updateProgressBarLabel(java.lang.String status)
          Change the text underneath the progress bar.
 void updateUpperStatusLabel(java.lang.String status)
          Set the text in the first label.
 
Methods inherited from class com.denova.ui.WizardPanel
abort, ask, ask, cancel, enter, getCancelButtonIconName, getCancelButtonLabel, getDefaultButton, getDefaultCancelButtonIconName, getDefaultFinishedButtonIconName, getDefaultInstallButtonIconName, getDefaultNextButtonIconName, getDefaultPreviousButtonIconName, getMostRecentPanelIndex, getMostRecentPanelName, getName, getNextButton, getNextButtonExists, getNextButtonIconName, getNextButtonLabel, getPanelIndex, getPreviousButton, getPreviousButtonExists, getPreviousButtonIconName, getPreviousButtonLabel, getPropertyList, isAix, isCurrentPanel, isEnabled, isHpUnix, isLinux, isMac, isMacOsX, isMpeUnix, isNetware, isOk, isOs2, isSolaris, isUnix, isWindows, isWindows2000, isWindows95, isWindows98, isWindowsNT, isWindowsXP, leave, note, note, note, reset, resetPanel, setActive, setCancelButtonEnabled, setDefaultButton, setEnabled, setEnabledNamedPanel, setNextButtonEnabled, setPreviousButtonEnabled, setPropertyList, setWizard, showPanel, showPanel, showPreviousPanel, userCanceled, wizardGetDefaultButton
 
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
 

Constructor Detail

StatusPanel

public StatusPanel(com.denova.util.PropertyList properties)
A custom class which has no user interaction can inherit from StatusPanel instead of WizardPanel, if you'd like. The advantage is that the status info to the user will be positioned in the exact same place that the standard installer's status panels, such as the MenusPanel and the UninstallPanel, use. This minimizes the changes on the screen to give a smoothr look to an installer which handles a lot of configuration.


StatusPanel

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

Constructor for this object.

Method Detail

gotMessage

public void gotMessage(java.lang.Object source,
                       java.lang.Object message)
Called when a message is sent to this panel. Subclasses which override this method must call super.gotMessage().

Specified by:
gotMessage in interface com.denova.util.MessageListener
Overrides:
gotMessage in class WizardPanel

setLabels

public void setLabels(java.lang.String lowerStatus)
Set the lower status message.


setLabels

public void setLabels(java.lang.String upperStatus,
                      java.lang.String lowerStatus)
Set the upper and lower status messages.


setLabels

public void setLabels(java.lang.String upperStatus,
                      java.lang.String lowerStatus,
                      java.lang.String progressBarStatus)
Set the status messages.


showNextPanel

public void showNextPanel()
Description copied from class: WizardPanel
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.

Overrides:
showNextPanel in class WizardPanel

startProgressBar

public void startProgressBar()
Start an automatic progress bar so the user knows the installer's working. This class automatically starts the progress bar when you enter the panel, so you usually don't need to call startProgressBar() explicitly.


stopProgressBar

public void stopProgressBar()
Stop the automatic progress bar.


pauseProgressBar

public void pauseProgressBar()
Pause the automatic progress bar.


updateProgressBar

public void updateProgressBar(int percent)
Update the percentage of the status bar which should be filled.


incrementProgressBar

public void incrementProgressBar()
Increment the progress bar a small amount.


incrementProgressBar

public void incrementProgressBar(int increment)
Increment the progress bar a small amount.


updateProgressBarLabel

public void updateProgressBarLabel(java.lang.String status)
Change the text underneath the progress bar.


updateUpperStatusLabel

public void updateUpperStatusLabel(java.lang.String status)
Set the text in the first label.

Parameters:
status - text to appear in the upper centered label.

updateLowerStatusLabel

public void updateLowerStatusLabel(java.lang.String status)
Set the text in the second label.

Parameters:
status - text to appear in the lower centered label.

isNextButtonEnabled

public boolean isNextButtonEnabled()
Disables the next button.

Overrides:
isNextButtonEnabled in class WizardPanel
Returns:
false.

isPreviousButtonEnabled

public boolean isPreviousButtonEnabled()
Disables the back button.

Overrides:
isPreviousButtonEnabled in class WizardPanel
Returns:
false.

isCancelButtonEnabled

public boolean isCancelButtonEnabled()
Disables the cancel button.

Overrides:
isCancelButtonEnabled in class WizardPanel
Returns:
false.

isSmooth

public static boolean isSmooth()
Returns the value of smooth.

Returns:
true if gui is smoothed
See Also:
setSmooth(boolean)

setSmooth

public static void setSmooth(boolean newSmooth)
Sets smoothing. If smooth is true, the status panel does several things to try and make the user interface smother. For example, it shares a single progress bar between subclasses of StatusPanel. Updates are smoothr. Labels are quieter. This is on by default. You may want to change it because in some cases it doesn't do exactly what subpanels ask.

Parameters:
newSmooth - True to smooth the status panel interface, else false.

getLocalizedString

protected java.lang.String getLocalizedString(java.lang.String key)

getLocalizedString

protected java.lang.String getLocalizedString(java.lang.String key,
                                              java.lang.String variable)