public abstract class AbstractDialogManager extends AbstractLoggableComponent implements DialogManager
DialogManager.| Modifier and Type | Field and Description |
|---|---|
private UiContext |
context |
private DialogPlace |
currentPlace |
private DialogPlace |
defaultPlace |
private DialogControllerFactory |
dialogControllerFactory |
private Map<String,DialogController<?>> |
id2DialogMap |
private LinkedList<PopupDialog> |
popupStack |
private Map<String,Dialog> |
type2currentDialogMap |
| Constructor and Description |
|---|
AbstractDialogManager()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize()
This method performs the actual
initialization. |
protected UiContext |
getContext() |
Dialog |
getCurrentDialog(String type)
This method gets the current
Dialog of the given type. |
Dialog |
getCurrentMainDialog()
|
DialogPlace |
getCurrentPlace()
This method gets the current
DialogPlace. |
PopupDialog |
getCurrentPopupDialog()
This method gets the current
PopupDialog. |
DialogController<?> |
getDialog(String dialogId)
|
protected abstract DialogPlace |
getStartPlace()
This method determines the start
DialogPlace. |
protected String |
getTitle(DialogController<?> dialogController)
This method determines the title for the given
DialogController. |
void |
initialize(DialogPlace defaultDialogPlace)
This method initializes this
DialogManager. |
void |
navigateTo(String dialogId)
This is a convenience method for
. |
(package private) void |
onHideDialog(Dialog dialog)
This method should be called whenever a
Dialog is hidden. |
(package private) void |
onShowDialog(Dialog dialog)
This method has to be called whenever a
Dialog is opened or brought to the front. |
void |
setContext(UiContext uiContext) |
void |
setDialogControllerFactory(DialogControllerFactory dialogControllerFactory) |
protected void |
show(DialogPlace dialogPlace) |
private boolean |
verifyUniqueAccessKeys() |
createLogger, getLoggerdoInitialized, getInitializationState, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnavigateBack, navigateForward, navigateTo, openInNewWindowprivate final Map<String,DialogController<?>> id2DialogMap
getDialog(String)private final Map<String,Dialog> type2currentDialogMap
getCurrentDialog(String)private final LinkedList<PopupDialog> popupStack
getCurrentPopupDialog()private DialogControllerFactory dialogControllerFactory
private UiContext context
setContext(UiContext)private DialogPlace defaultPlace
initialize(DialogPlace)private DialogPlace currentPlace
getCurrentPlace()@Inject public void setDialogControllerFactory(DialogControllerFactory dialogControllerFactory)
dialogControllerFactory - is the DialogControllerFactory to set manually or via
Inject.@Inject public void setContext(UiContext uiContext)
uiContext - is the UiContext to Inject.protected void doInitialize()
initialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractLoggableComponentpublic void initialize(DialogPlace defaultDialogPlace)
DialogManager. It opens the first dialog according to the initial
DialogPlace that may be provided by the user e.g. from a bookmark. If no DialogPlace is
given by the user, the defaultPlace is opened.initialize in interface DialogManagerdefaultDialogPlace - is the DialogPlace of the start Dialog to open as default.public DialogPlace getCurrentPlace()
DialogPlace.getCurrentPlace in interface DialogManagerDialogPlace. Will be null until DialogManager.initialize(DialogPlace)
has been called.protected abstract DialogPlace getStartPlace()
DialogPlace. If the application is started from a bookmark, this
method will create the DialogPlace from this bookmark (in case of a web-application from the hash
of the URL).DialogPlace or null if not present (and
default shall be used.initialize(DialogPlace)public DialogController<?> getDialog(String dialogId) throws ObjectNotFoundException
getDialog in interface DialogManagerdialogId - the ID of the requested Dialog.Dialog.ObjectNotFoundException - if no Dialog with the given dialogId.public Dialog getCurrentDialog(String type)
Dialog of the given type. If multiple Dialogs
of the same type are open at a time, this method will return the one in the front.getCurrentDialog in interface DialogManagertype - is the type of the requested Dialog.Dialog with the given type or null if no such
Dialog is visible.public Dialog getCurrentMainDialog()
getCurrentMainDialog in interface DialogManagerDialog.public PopupDialog getCurrentPopupDialog()
PopupDialog. If multiple PopupDialogs are open, it will
return the top-level one. PopupDialog there can also be simple
popups that are NOT considered by this method.getCurrentPopupDialog in interface DialogManagerPopupDialog or null if no PopupDialog is currently open.void onShowDialog(Dialog dialog)
Dialog is opened or brought to the front.dialog - the current Dialog.void onHideDialog(Dialog dialog)
Dialog is hidden.dialog - the Dialog to hide.public final void navigateTo(String dialogId)
navigateTo(new DialogPlace(dialogId)). DialogPlace for further details.navigateTo in interface DialogManagerdialogId - is the ID of the dialog to open.protected void show(DialogPlace dialogPlace)
dialogPlace - is the DialogPlace to show.DialogManager.navigateTo(DialogPlace)private boolean verifyUniqueAccessKeys()
true.UiAccessKeyBinding.verifyUniqueAccessKeys()protected String getTitle(DialogController<?> dialogController)
DialogController.dialogController - is the DialogController.Copyright © 2001–2016 mmm-Team. All rights reserved.