|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
net.java.sip.communicator.util.swing.SIPCommDialog
net.java.sip.communicator.impl.gui.customcontrols.wizard.Wizard
public class Wizard
This class implements a basic wizard dialog, where the programmer can insert one or more Components to act as panels. These panels can be navigated through arbitrarily using the 'Next' or 'Back' buttons, or the dialog itself can be closed using the 'Cancel' button. Note that even though the dialog uses a CardLayout manager, the order of the panels is not linear. Each panel determines at runtime what its next and previous panel will be.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.java.sip.communicator.util.swing.SIPCommDialog |
|---|
SIPCommDialog.DialogWindowAdapter |
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| 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 | |
|---|---|
static String |
BACK_BUTTON_ACTION_COMMAND
The String-based action command for the 'Back' button. |
static String |
CANCEL_BUTTON_ACTION_COMMAND
The String-based action command for the 'Cancel' button. |
static int |
CANCEL_RETURN_CODE
Indicates that the 'Cancel' button was pressed to close the dialog, or the user pressed the close box in the corner of the window. |
static int |
ERROR_RETURN_CODE
Indicates that the dialog closed due to an internal error. |
static int |
FINISH_RETURN_CODE
Indicates that the 'Finish' button was pressed to close the dialog. |
static String |
NEXT_BUTTON_ACTION_COMMAND
The String-based action command for the 'Next' button. |
(package private) ResourceManagementService |
resources
The i18n text used for the buttons. |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Wizard(Dialog owner)
This method accepts a java.awt.Dialog object as the javax.swing.JDialog's parent. |
|
Wizard(Frame owner)
This method accepts a java.awt.Frame object as the javax.swing.JDialog's parent. |
|
| Method Summary | |
|---|---|
void |
addWizardListener(WizardListener l)
|
protected void |
close(boolean isEscaped)
Implements the SIPCommDialog close method. |
(package private) void |
close(int code)
Closes the dialog and sets the return code to the integer parameter. |
boolean |
containsPage(Object id)
Checks whether a page with the given id exists in the wizard. |
JButton |
getBackButton()
Returns the back wizard button. |
String |
getBackButtonDefaultText()
Returns the default text of the back wizard button. |
String |
getCancelButtonDefaultText()
Returns the default text of the cancel wizard button. |
JDialog |
getDialog()
Returns an instance of the JDialog that this class created.This is useful in the event that you want to change any of the JDialog parameters manually. |
String |
getFinishButtonDefaultText()
Returns the default text of the finish wizard button. |
WizardModel |
getModel()
Returns the current model of the wizard dialog. |
JButton |
getNextButton()
Returns the next wizard button. |
String |
getNextButtonDefaultText()
Returns the default text of the next wizard button. |
boolean |
isBackButtonEnabled()
Mirrors the WizardModel method of the same name. |
boolean |
isCancelButtonEnabled()
Mirrors the WizardModel method of the same name. |
boolean |
isNextFinishButtonEnabled()
Mirrors the WizardModel method of the same name. |
void |
propertyChange(PropertyChangeEvent evt)
Method used to listen for property change events from the model and update the dialog's graphical components as necessary. |
void |
refresh()
Refreshes this wizard dialog. |
void |
registerWizardPage(Object id,
WizardPage page)
Adds the given WizardPage in this wizard. |
void |
removeWizardListener(WizardListener l)
|
void |
removeWizzardIcon()
|
(package private) void |
setBackButtonDefaultText(String backButtonDefaultText)
Sets the back button default text. |
void |
setBackButtonEnabled(boolean newValue)
Mirrors the WizardModel method of the same name. |
(package private) void |
setCancelButtonDefaultText(String cancelButtonDefaultText)
Sets the cancel button default text. |
void |
setCancelButtonEnabled(boolean newValue)
Mirrors the WizardModel method of the same name. |
void |
setCurrentPage(Object id)
Displays the panel identified by the object passed in. |
(package private) void |
setFinishButtonDefaultText(String finishButtonDefaultText)
Sets the finish button default text. |
void |
setFinishButtonText(String text)
Sets the text label of the "Finish" wizard button. |
(package private) void |
setNextButtonDefaultText(String nextButtonDefaultText)
Sets the next button default text. |
void |
setNextFinishButtonEnabled(boolean newValue)
Mirrors the WizardModel method of the same name. |
void |
setWizzardIcon(BufferedImage wizardIcon)
|
void |
showDialog(boolean modal)
Convenience method that displays a modal wizard dialog and blocks until the dialog has completed. |
(package private) void |
startCommittingPage()
Changes cursor and status label, informing user we are in process of connecting. |
(package private) void |
stopCommittingPage()
Changes cursor and status label, informing user we finished the process of connecting. |
void |
unregisterWizardPage(Object id)
Removes from the wizard the WizardPage corresponding to the given identifier. |
void |
windowActivated(WindowEvent e)
|
void |
windowClosed(WindowEvent e)
|
void |
windowClosing(WindowEvent e)
If the user presses the close box on the dialog's window, treat it as a cancel. |
void |
windowDeactivated(WindowEvent e)
|
void |
windowDeiconified(WindowEvent e)
|
void |
windowIconified(WindowEvent e)
|
void |
windowOpened(WindowEvent e)
|
| Methods inherited from class net.java.sip.communicator.util.swing.SIPCommDialog |
|---|
addKeyBinding, dispose, setVisible |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int FINISH_RETURN_CODE
public static final int CANCEL_RETURN_CODE
public static final int ERROR_RETURN_CODE
public static final String NEXT_BUTTON_ACTION_COMMAND
public static final String BACK_BUTTON_ACTION_COMMAND
public static final String CANCEL_BUTTON_ACTION_COMMAND
ResourceManagementService resources
| Constructor Detail |
|---|
public Wizard(Dialog owner)
owner - The java.awt.Dialog object that is the owner of this dialog.public Wizard(Frame owner)
owner - The java.awt.Frame object that is the owner of the
javax.swing.JDialog.| Method Detail |
|---|
public JDialog getDialog()
public void showDialog(boolean modal)
modal - whether to show a modal dialogpublic WizardModel getModel()
public void registerWizardPage(Object id,
WizardPage page)
id - An Object-based identifier used to identify the WizardPage
objectpage - The WizardPage object to register in this wizardpublic void unregisterWizardPage(Object id)
id - The identifier of the wizard page.public boolean containsPage(Object id)
id - the identifier of the searched page
public void setCurrentPage(Object id)
id - The Object-based identifier of the panel to be displayed.public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerevt - PropertyChangeEvent passed from the model to signal that one
of its properties has changed value.public boolean isBackButtonEnabled()
isBackButtonEnabled in interface WizardContainerpublic void setBackButtonEnabled(boolean newValue)
setBackButtonEnabled in interface WizardContainernewValue - The new enabled status of the button.public boolean isNextFinishButtonEnabled()
isNextFinishButtonEnabled in interface WizardContainerpublic void setNextFinishButtonEnabled(boolean newValue)
setNextFinishButtonEnabled in interface WizardContainernewValue - The new enabled status of the button.public boolean isCancelButtonEnabled()
isCancelButtonEnabled in interface WizardContainerpublic void setCancelButtonEnabled(boolean newValue)
setCancelButtonEnabled in interface WizardContainernewValue - The new enabled status of the button.void close(int code)
code - The return code.public void windowClosing(WindowEvent e)
windowClosing in interface WindowListenere - The event passed in from AWT.public void setWizzardIcon(BufferedImage wizardIcon)
public void removeWizzardIcon()
public void addWizardListener(WizardListener l)
public void removeWizardListener(WizardListener l)
protected void close(boolean isEscaped)
close in class SIPCommDialogisEscaped - indicates if this frame has been closed by pressing the
Esc key; otherwise, falsepublic void windowActivated(WindowEvent e)
windowActivated in interface WindowListenerpublic void windowClosed(WindowEvent e)
windowClosed in interface WindowListenerpublic void windowDeactivated(WindowEvent e)
windowDeactivated in interface WindowListenerpublic void windowDeiconified(WindowEvent e)
windowDeiconified in interface WindowListenerpublic void windowIconified(WindowEvent e)
windowIconified in interface WindowListenerpublic void windowOpened(WindowEvent e)
windowOpened in interface WindowListenerpublic JButton getNextButton()
public JButton getBackButton()
public void refresh()
refresh in interface WizardContainerpublic String getBackButtonDefaultText()
void setBackButtonDefaultText(String backButtonDefaultText)
backButtonDefaultText - the text to setpublic String getNextButtonDefaultText()
void setNextButtonDefaultText(String nextButtonDefaultText)
nextButtonDefaultText - the text to setpublic String getFinishButtonDefaultText()
void setFinishButtonDefaultText(String finishButtonDefaultText)
finishButtonDefaultText - the text to setpublic String getCancelButtonDefaultText()
void setCancelButtonDefaultText(String cancelButtonDefaultText)
cancelButtonDefaultText - the text to setpublic void setFinishButtonText(String text)
setFinishButtonText in interface WizardContainertext - the new label of the buttonvoid startCommittingPage()
void stopCommittingPage()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||