org.qdwizard
Class Screen

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.qdwizard.Screen
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public abstract class Screen
extends javax.swing.JPanel

A wizard screen

Author:
Bertrand Florat
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 java.util.HashMap<java.lang.String,java.lang.Object> data
           
 
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
Screen()
          Construct a screen
 
Method Summary
 boolean canCancel()
           
abstract  java.lang.String getDescription()
          Screen description (optional)
abstract  java.lang.String getName()
          Give here the step name.
 java.lang.String getProblem()
          Get current problem
 Wizard getWizard()
          access to wizard instance
abstract  void initUI()
          UI creation
 void onCancelled()
          Called by wizard when the wizard is being cancelled.
 void onEnter()
          Called by wizard before the screen is displayed.
 void onFinished()
          Called by wizard when the wizard is closing because the Finish button was pressed.
 void onLeave()
          Deprecated. 
 boolean onNext()
          Called by wizard before the screen is left.
 void paint(java.awt.Graphics g)
           
 void setBgColor(java.awt.Color bgColor)
           
 void setCanCancel(boolean b)
          Set whether the cancel (or System menu close) button should be enabled
 void setCanFinish(boolean b)
          Set whether the finish button should be enabled
 void setProblem(java.lang.String sProblem)
          Set a problem (set to null if problem is fixed)
 void setStateObserver(java.util.Observer ob)
           
 void setWizard(Wizard wizard)
          called in wizard after cosntructing a new Screen instance
 
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, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, 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, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

public java.util.HashMap<java.lang.String,java.lang.Object> data
Constructor Detail

Screen

public Screen()
Construct a screen

Parameters:
sName - Screen name
sDesc - description
Method Detail

getName

public abstract java.lang.String getName()
Give here the step name.

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

getDescription

public abstract java.lang.String getDescription()
Screen description (optional)

Returns:
screen description

setCanFinish

public void setCanFinish(boolean b)
Set whether the finish button should be enabled

Parameters:
b -

canCancel

public boolean canCancel()

setCanCancel

public void setCanCancel(boolean b)
Set whether the cancel (or System menu close) button should be enabled

Parameters:
b -

setProblem

public void setProblem(java.lang.String sProblem)
Set a problem (set to null if problem is fixed)

Parameters:
sProblem - Problem string or null if no more problem

getProblem

public java.lang.String getProblem()
Get current problem

Returns:
the current problem

initUI

public abstract void initUI()
UI creation


onEnter

public void onEnter()
Called by wizard before the screen is displayed. This happens only in forwardmode, which means onEnter won't be called when you return to a screen via the previous button.


onLeave

@Deprecated
public void onLeave()
Deprecated. 

Called by wizard before the screen is left. This happens only in forwardmode, which means onLeave won't be called when you leave the screen via the previous button.

Deprecated: use onNext()


onNext

public boolean onNext()
Called by wizard before the screen is left. This happens only in forwardmode, which means onLeave won't be called when you leave the screen via the previous button.

Returns:
return true if the Wizard should display the next screen

onCancelled

public void onCancelled()
Called by wizard when the wizard is being cancelled. Use this function to clean up (like stop any threads that this Screen might have created)


onFinished

public void onFinished()
Called by wizard when the wizard is closing because the Finish button was pressed. Use this function to clean up (like stop any threads that this Screen might have created)


getWizard

public Wizard getWizard()
access to wizard instance

Returns:

setWizard

public void setWizard(Wizard wizard)
called in wizard after cosntructing a new Screen instance

Parameters:
wizard -

setStateObserver

public void setStateObserver(java.util.Observer ob)

setBgColor

public void setBgColor(java.awt.Color bgColor)

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent


Copyright © 2007. All Rights Reserved.