|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qdwizard.Wizard
public abstract class Wizard
A Wizard dialog displaying one to many screens
MyWizard wizard = new MyWizard(String sName,Class initial, ImageIcon icon,Frame parentWindow, Locale locale,int iHSize,int iVSize); wizard.show();
public Class getNextScreen(Class screen) { if (ActionSelectionPanel.class.equals(getCurrentScreen())) { String sAction = (String) data.get(KEY_ACTION); if (ActionSelectionPanel.ACTION_CREATION.equals(sAction)) { return TypeSelectionPanel.class; } else if (ActionSelectionPanel.ACTION_DELETE.equals(sAction)) { return RemovePanel.class; } } }
Field Summary | |
---|---|
static java.util.HashMap<java.lang.String,java.lang.Object> |
data
Wizard data |
protected static int |
DEFAULT_H_LAYOUT_PADDING
|
protected static int |
DEFAULT_H_SIZE
Default Wizard size |
protected static int |
DEFAULT_V_LAYOUT_PADDING
|
protected static int |
DEFAULT_V_SIZE
|
Constructor Summary | |
---|---|
Wizard(java.lang.String sName,
java.lang.Class<? extends Screen> initial,
javax.swing.ImageIcon icon,
java.awt.Frame parentWindow)
Wizard constructor (uses default locale) |
|
Wizard(java.lang.String sName,
java.lang.Class<? extends Screen> initial,
javax.swing.ImageIcon icon,
java.awt.Frame parentWindow,
java.util.Locale locale)
Wizard constructor |
|
Wizard(java.lang.String sName,
java.lang.Class<? extends Screen> initial,
javax.swing.ImageIcon icon,
java.awt.Image backgroundImage,
java.awt.Frame parentWindow)
Wizard constructor (uses default locale) |
|
Wizard(java.lang.String sName,
java.lang.Class<? extends Screen> initial,
javax.swing.ImageIcon icon,
java.awt.Image backgroundImage,
java.awt.Frame parentWindow,
java.util.Locale locale)
Wizard constructor |
|
Wizard(java.lang.String sName,
java.lang.Class initial,
javax.swing.ImageIcon icon,
java.awt.Frame parentWindow,
java.util.Locale locale,
int iHSize,
int iVSize)
Wizard constructor |
|
Wizard(java.lang.String sName,
java.lang.Class initial,
javax.swing.ImageIcon icon,
java.awt.Image backgroundImage,
java.awt.Frame parentWindow,
java.util.Locale locale,
int iHSize,
int iVSize,
int iLayoutHPadding,
int iLayoutVPadding)
Wizard constructor |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
|
void |
clearScreens()
Clear screens history |
abstract void |
finish()
Finish action. |
java.lang.Class<? extends Screen> |
getCurrentScreen()
Get current screen |
javax.swing.JDialog |
getDialog()
access to the JDialog of the wizard, in case we need it (for instance to set a glass pane when waiting) |
abstract java.lang.Class<? extends Screen> |
getNextScreen(java.lang.Class<? extends Screen> screen)
|
abstract java.lang.Class<? extends Screen> |
getPreviousScreen(java.lang.Class<? extends Screen> screen)
|
boolean |
onCancel()
Called when user clicks on "cancel". |
void |
setActionsBackgroundColor(java.awt.Color color)
Set the background color of the ActionPanel |
void |
setHeaderIcon(javax.swing.ImageIcon icon)
Set the header icon |
void |
setHeaderImage(java.awt.Image img)
Set the header image |
void |
setProblemBackgroundColor(java.awt.Color color)
Set the background color of the ActionPanel's Problem notification area |
void |
show()
|
void |
updateGUI()
Refresh buttons and problems. |
boolean |
wasCancelled()
|
void |
windowActivated(java.awt.event.WindowEvent windowEvent)
Called when the wizard dialog is activated. |
void |
windowClosed(java.awt.event.WindowEvent windowEvent)
Called when the wizard dialog is closed. |
void |
windowClosing(java.awt.event.WindowEvent windowEvent)
|
void |
windowDeactivated(java.awt.event.WindowEvent windowEvent)
Called when the wizard dialog is deactivated. |
void |
windowDeiconified(java.awt.event.WindowEvent windowEvent)
Called when the wizard dialog is deiconified. |
void |
windowIconified(java.awt.event.WindowEvent windowEvent)
Called when the wizard dialog is iconified. |
void |
windowOpened(java.awt.event.WindowEvent windowEvent)
Called when the wizard dialog opens. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.HashMap<java.lang.String,java.lang.Object> data
protected static final int DEFAULT_H_SIZE
protected static final int DEFAULT_V_SIZE
protected static final int DEFAULT_H_LAYOUT_PADDING
protected static final int DEFAULT_V_LAYOUT_PADDING
Constructor Detail |
---|
public Wizard(java.lang.String sName, java.lang.Class initial, javax.swing.ImageIcon icon, java.awt.Image backgroundImage, java.awt.Frame parentWindow, java.util.Locale locale, int iHSize, int iVSize, int iLayoutHPadding, int iLayoutVPadding)
sName
- Wizard name displayed in dialog titleinitial
- Initial screen classicon
- Wizard icon (null if no icon)backgroundImage
- background imageparentWindow
- wizard parent windowlocale
- Wizard localeiHSize
- Horizontal sizeiVSize
- Vertical sizeiLayoutHPadding
- Horizontal layout paddingiLayoutVPadding
- Vertical layout paddingpublic Wizard(java.lang.String sName, java.lang.Class initial, javax.swing.ImageIcon icon, java.awt.Frame parentWindow, java.util.Locale locale, int iHSize, int iVSize)
sName
- Wizard name displayed in dialog titleinitial
- Initial screen classicon
- Wizard icon (null if no icon)parentWindow
- wizard parent windowlocale
- Wizard localeiHSize
- Horizontal sizeiVSize
- Vertical sizepublic Wizard(java.lang.String sName, java.lang.Class<? extends Screen> initial, javax.swing.ImageIcon icon, java.awt.Image backgroundImage, java.awt.Frame parentWindow, java.util.Locale locale)
sName
- Wizard name displayed in dialog titleinitial
- Initial screen classicon
- Wizard icon (null if no icon)backgroundImage
- Wizard header background (null if no image)parentWindow
- wizard parent windowlocale
- Wizard localepublic Wizard(java.lang.String sName, java.lang.Class<? extends Screen> initial, javax.swing.ImageIcon icon, java.awt.Frame parentWindow, java.util.Locale locale)
sName
- Wizard name displayed in dialog titleinitial
- Initial screen classicon
- Wizard icon (null if no icon)parentWindow
- wizard parent windowlocale
- Wizard localepublic Wizard(java.lang.String sName, java.lang.Class<? extends Screen> initial, javax.swing.ImageIcon icon, java.awt.Image backgroundImage, java.awt.Frame parentWindow)
sName
- Wizard name displayed in dialog titleinitial
- Initial screen classicon
- Wizard icon (null if no icon)backgroundImage
- Wizard header background (null if no image)parentWindow
- wizard parent windowpublic Wizard(java.lang.String sName, java.lang.Class<? extends Screen> initial, javax.swing.ImageIcon icon, java.awt.Frame parentWindow)
sName
- Wizard name displayed in dialog titleinitial
- Initial screen classicon
- Wizard icon (null if no icon)parentWindow
- wizard parent windowMethod Detail |
---|
public void show()
public javax.swing.JDialog getDialog()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
public void setHeaderImage(java.awt.Image img)
img
- public void setHeaderIcon(javax.swing.ImageIcon icon)
img
- public void setActionsBackgroundColor(java.awt.Color color)
color
- public void setProblemBackgroundColor(java.awt.Color color)
color
- public abstract java.lang.Class<? extends Screen> getPreviousScreen(java.lang.Class<? extends Screen> screen)
public void clearScreens()
public abstract java.lang.Class<? extends Screen> getNextScreen(java.lang.Class<? extends Screen> screen)
public java.lang.Class<? extends Screen> getCurrentScreen()
public void updateGUI()
public abstract void finish()
public boolean onCancel()
public void windowClosing(java.awt.event.WindowEvent windowEvent)
windowClosing
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent windowEvent)
windowOpened
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent windowEvent)
caution: You must always call super.windowClosed(windowEvent) within the override function to ensure that the Wizard closes completely.
windowClosed
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent windowEvent)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent windowEvent)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent windowEvent)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent windowEvent)
windowDeactivated
in interface java.awt.event.WindowListener
public boolean wasCancelled()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |