|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.dialog.StandardDialogPane com.jidesoft.wizard.WizardDialogPane
public class WizardDialogPane
Wizard is a well-known user interface that is ideal to guide user through for complex and unfamiliar tasks. A typical usage of it is project wizard - which asks user a couple questions and generate source code of a project automatically for user.
There are several wizard standards. The most famous two are Microsoft Wizard 97 standard and Java Wizard standard. Please see references for details. I strongly suggest you read those chapters before designing any wizards since those documents are also the specs for our wizard component. Both documents are very well-written. Micrsoft Wizard 97 Standard
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class com.jidesoft.dialog.StandardDialogPane |
---|
_bannerPanel, _buttonPanel, _contentPanel, PROPERTY_CANCEL_ACTION, PROPERTY_DEFAULT_ACTION |
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.jidesoft.dialog.ButtonNames |
---|
APPLY, BACK, BROWSE, CANCEL, CLEAR, CLOSE, DETAILS, EDIT, EXIT, FIND, FIND_NEXT, FINISH, FORWARD, HELP, NEW, NEXT, NO, OK, OPEN, PRINT, REPLACE, RESET, RETRY, RUN, SAVE, SAVE_AS, STOP, YES |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
WizardDialogPane()
Creates a wizard dialog with no owner. |
Method Summary | |
---|---|
boolean |
closeCurrentPage()
Close current dialog page. |
protected boolean |
closeCurrentPage(AbstractDialogPage newPage,
Object source)
Close current dialog page. |
boolean |
closeCurrentPage(Object source)
Close current dialog page with an optional source object. |
protected void |
createActions()
Subclass can override to create actions for buttons. |
JComponent |
createBannerPanel()
Implements createBannerPanel() in StandardDialog . |
ButtonPanel |
createButtonPanel()
Implements createButtonPanel() in StandardDialog . |
JComponent |
createContentPanel()
Implements createContentPanel() in StandardDialog . |
JComponent |
createEmptyPane()
Creates the graphic panel. |
JComponent |
createGraphicPane()
Creates the graphic panel. |
protected JComponent |
createHelpPane()
Creates the help pane. |
protected JComponent |
createLeftTabbedPane()
Creates tabbed pane to hold both steps and help pane in left pane. |
protected JComponent |
createPagesPanel()
Creates JPanel with CardLayout ot put all wizard pages. |
protected StepsPane |
createStepsPane()
|
protected JComponent |
createStepsPane(List<String> list,
int index)
Creates the steps pane. |
AbstractAction |
getBackAction()
Get the back action. |
AbstractAction |
getCancelAction()
Gets the cancel action. |
Dimension |
getContentLargerSize()
Gets the larger standard size of content pane when the standard size is not enough. |
Dimension |
getContentSize()
Gets the content pane size. |
Dimension |
getContentStandardSize()
Gets the standard size of content pane. |
AbstractDialogPage |
getCurrentPage()
Gets the current selected page. |
Image |
getDefaultGraphic()
Gets the default graphic that will be displayed in left pane. |
AbstractAction |
getFinishAction()
Gets the finish action. |
JavaHelpPane |
getHelpPane()
Gets the help pane if help pane is used. |
int |
getLargerLeftPaneWidth()
Gets the larger standard width of left pane when the larger standard size is used. |
JComponent |
getLeftPanel()
Gets the left pane. |
int |
getLeftPanelWidth()
Gets the width of left panel. |
AbstractAction |
getNextAction()
Get the next action. |
AbstractDialogPage |
getNextPage()
Gets the default next page. |
AbstractDialogPage |
getPageByTitle(String title)
Gets the page by the full title. |
PageList |
getPageList()
Gets the page list which have all the wizard pages. |
JComponent |
getPagesPanel()
Gets the pages panel. |
protected AbstractDialogPage |
getPossibleNextPage()
|
int |
getStandardLeftPaneWidth()
Gets the standard width of left pane. |
StepsPane |
getStepsPane()
Gets the steps pane if steps pane is used. |
List<AbstractPage> |
getVisitedPages()
Gets list of visited pages. |
boolean |
isResizable()
Override to return false. |
boolean |
isStepsPaneNavigable()
Checks if the steps pane can be clicked to navigate to the corresponding page. |
void |
setBackAction(AbstractAction backAction)
Changes the default back action. |
void |
setCancelAction(AbstractAction cancelAction)
Changes the default cancel action. |
void |
setContentSize(Dimension contentSize)
Sets the content size. |
protected boolean |
setCurrentPage(AbstractDialogPage currentPage,
boolean isBack)
Sets the current selected page. |
protected boolean |
setCurrentPage(AbstractDialogPage newCurrentPage,
boolean isBack,
Object source)
Sets the current selected page. |
boolean |
setCurrentPage(String pageTitle)
Sets the current selected page. |
protected boolean |
setCurrentPage(String pageTitle,
boolean isBack)
Sets the current selected page. |
void |
setDefaultGraphic(Image defaultGraphic)
Sets the default graphic that will be displayed in left pane. |
void |
setFinishAction(AbstractAction finishAction)
Changes the default finish action. |
void |
setLeftPanelWidth(int leftPanelWidth)
Sets the left panel width. |
void |
setNextAction(AbstractAction nextAction)
Changes the default next action. |
void |
setNextPage(AbstractDialogPage nextPage)
Sets the next page. |
void |
setPageList(PageList pageList)
Sets the page list to wizard dialog pane. |
void |
setStepsPaneNavigable(boolean stepsPaneNavigable)
Sets the steps pane navigable. |
protected void |
updateBannerPanel(JComponent bannerPanel,
AbstractDialogPage page)
Updates the banner panel based on current page. |
Methods inherited from class com.jidesoft.dialog.StandardDialogPane |
---|
getBannerPanel, getButtonPanel, getContentPanel, getDefaultAction, getDefaultCancelAction, getInitFocusedComponent, initComponents, layoutComponents, setDefaultAction, setDefaultCancelAction, setInitFocusedComponent |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WizardDialogPane() throws HeadlessException
HeadlessException
- when the keyboard or mouse event is not processableMethod Detail |
---|
public JComponent createBannerPanel()
StandardDialog
.
createBannerPanel
in class StandardDialogPane
protected void updateBannerPanel(JComponent bannerPanel, AbstractDialogPage page)
bannerPanel
- the banner panelpage
- the dialog pagepublic JComponent createContentPanel()
StandardDialog
.
createContentPanel
in class StandardDialogPane
public ButtonPanel createButtonPanel()
StandardDialog
.
By default it will create four buttons and corresponding actions - NEXT, BACK, FINISH and CANCEL.
createButtonPanel
in class StandardDialogPane
ButtonPanel
protected void createActions()
protected AbstractDialogPage getPossibleNextPage()
public void setBackAction(AbstractAction backAction)
backAction
- the actionpublic AbstractAction getBackAction()
public void setNextAction(AbstractAction nextAction)
nextAction
- the actionpublic AbstractAction getNextAction()
public void setCancelAction(AbstractAction cancelAction)
cancelAction
- the actionpublic void setFinishAction(AbstractAction finishAction)
finishAction
- the actionpublic AbstractAction getCancelAction()
public AbstractAction getFinishAction()
protected JComponent createPagesPanel()
public void setPageList(PageList pageList)
pageList
- the page list
IllegalArgumentException
- if the pages have duplicated titles.public PageList getPageList()
public AbstractDialogPage getCurrentPage()
public boolean setCurrentPage(String pageTitle)
pageTitle
- new page title.
protected boolean setCurrentPage(String pageTitle, boolean isBack)
pageTitle
- new page title.isBack
- is this caused by BACK button.
protected boolean setCurrentPage(AbstractDialogPage currentPage, boolean isBack)
currentPage
- new page.isBack
- is this caused by BACK button.
public boolean closeCurrentPage()
public boolean closeCurrentPage(Object source)
source
- the source of the PageEvent that will be fired when closing the current page
protected boolean closeCurrentPage(AbstractDialogPage newPage, Object source)
newPage
- the new page. If current page is the same as nwe page, nothing will be done. It you will close the page and will not open any new page, for example, when finish or cancel button is pressed, you can pass in null.source
- the source that will be used in event.
protected boolean setCurrentPage(AbstractDialogPage newCurrentPage, boolean isBack, Object source)
newCurrentPage
- new page.isBack
- is this caused by BACK button.source
- source for the event
protected JComponent createLeftTabbedPane()
protected JComponent createStepsPane(List<String> list, int index)
list
- the page title listindex
- selected page.
protected StepsPane createStepsPane()
protected JComponent createHelpPane()
public JComponent getLeftPanel()
public JComponent getPagesPanel()
public int getLeftPanelWidth()
public void setLeftPanelWidth(int leftPanelWidth)
leftPanelWidth
- the width of the left panelpublic Dimension getContentSize()
public void setContentSize(Dimension contentSize)
contentSize
- the size of the contentpublic Dimension getContentStandardSize()
public int getStandardLeftPaneWidth()
public Dimension getContentLargerSize()
public int getLargerLeftPaneWidth()
public AbstractDialogPage getPageByTitle(String title)
title
- the title
public AbstractDialogPage getNextPage()
public void setNextPage(AbstractDialogPage nextPage)
nextPage
- next dialog pagepublic List<AbstractPage> getVisitedPages()
public JComponent createGraphicPane()
public JComponent createEmptyPane()
public Image getDefaultGraphic()
public void setDefaultGraphic(Image defaultGraphic)
defaultGraphic
- the default graphic imagepublic StepsPane getStepsPane()
public JavaHelpPane getHelpPane()
public boolean isResizable()
public boolean isStepsPaneNavigable()
public void setStepsPaneNavigable(boolean stepsPaneNavigable)
stepsPaneNavigable
- true or false.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |