org.peace_tools.generic
Class GenericWizardPage

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.peace_tools.generic.GenericWizardPage
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, WizardPage
Direct Known Subclasses:
AnalyzerWizardPage, ClusterWizardPage, ESTInfoWizardPage, FiltersWizardPage, HeuristicsWizardPage, JobInfoWizardPage, MSTWizardPage, ServerAddingEntryWizardPage, ServerInfoWizardPage, ServerTypeWizardPage, SubmitJobWizardPage, SummaryWizardPage, VerifyWizardPage

public class GenericWizardPage
extends javax.swing.JPanel
implements WizardPage

This class serves as a generic wizard page. This page provides a generic mechanism to display a component in a wizard. Typically, this page is used for displaying some information such as introductory message to provide a overview of the activities involved with a given wizard. This page is rather simple in the sense that it simply displays a component. It does not perform any other operation and readily lets the user switch the wizard page to the next page.

Note:This page uses a BorderLayout by default. You can add any component to this page or even change the default layout.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private static long serialVersionUID
          The generated serial UID for serializing this class.
private  java.lang.String subTitle
          The subtitle to be set for this wizard page.
private  java.lang.String title
          The title to be set for this wizard page.
 
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
GenericWizardPage()
          The default constructor.
 
Method Summary
 java.awt.Component getPage()
          Method to return the component for this wizard page.
 java.lang.String getSubTitle()
          This method returns the sub-title set for this web page.
 java.lang.String getTitle()
          This method returns the title set for this wizard page.
 void pageChanged(WizardDialog dialog, int currPage, int prevPage)
          Method to setup this page just before it is displayed.
 boolean pageChanging(WizardDialog dialog, int currPage, int nextPage)
          Method to veto a page change (if needed).
 void setTitle(java.lang.String title, java.lang.String subTitle)
          This method must be used to set the title and subtitle for this panel.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

title

private java.lang.String title
The title to be set for this wizard page. This value is set via the setTitle method and is returned via the getTitle method.


subTitle

private java.lang.String subTitle
The subtitle to be set for this wizard page. This value is set via the setTitle method and is returned via the getSubTitle method.


serialVersionUID

private static final long serialVersionUID
The generated serial UID for serializing this class.

See Also:
Constant Field Values
Constructor Detail

GenericWizardPage

public GenericWizardPage()
The default constructor. The default constructor merely sets up the this panel with a border layout. The message to be displayed is set later on through a call to the setMessage() method.

Method Detail

setTitle

public void setTitle(java.lang.String title,
                     java.lang.String subTitle)
This method must be used to set the title and subtitle for this panel.

Parameters:
title - The title to be set for this wizard page.
subTitle - The subtitle to be set for this wizard page.

getPage

public java.awt.Component getPage()
Method to return the component for this wizard page.

Specified by:
getPage in interface WizardPage
Returns:
This method simply returns this to display this component as the overview page.

getSubTitle

public java.lang.String getSubTitle()
This method returns the sub-title set for this web page. This method is invoked by the core wizard dialog whenever it needs to display the sub-title for this page.

Specified by:
getSubTitle in interface WizardPage
Returns:
The sub-title set for this page.

getTitle

public java.lang.String getTitle()
This method returns the title set for this wizard page. This method is invoked by the core wizard dialog whenever it needs to display the title for this page.

Specified by:
getTitle in interface WizardPage
Returns:
The title set for this page.

pageChanged

public void pageChanged(WizardDialog dialog,
                        int currPage,
                        int prevPage)
Method to setup this page just before it is displayed. This method is invoked by the core WizardDialog panel just before this page is displayed. This method does not have any special setup to do and is empty.

Specified by:
pageChanged in interface WizardPage
Parameters:
dialog - The wizard dialog that is invoking this method.
currPage - The logical (zero-based) index of the current page in the sequence of pages in the wizard that is going to be displayed.
prevPage - The logical (zero-based) index of the previous page that was displayed. For the first page this value is -1.

pageChanging

public boolean pageChanging(WizardDialog dialog,
                            int currPage,
                            int nextPage)
Method to veto a page change (if needed). This method is invoked by the core WizardDialog panel just before the user changes from this page. This method does not veto such a change and always returns true.

Specified by:
pageChanging in interface WizardPage
Parameters:
dialog - The wizard dialog that is invoking this method.
currPage - The logical (zero-based) index of the current page in the sequence of pages in the wizard.
nextPage - The logical (zero-based) index of the next page that is going to be displayed.
Returns:
This method always returns true to indicate that the user can navigate off from this page.