public class DialogManager extends Object implements Disposable
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
DialogManager.DialogCallback
Callback interface for the opening/closing of a dialog. 
 | 
| Constructor and Description | 
|---|
DialogManager(Application pApp)
Creates a new dialog manager. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canPassivate()
Helper method that checks if all active dialogs can be passivated. 
 | 
void | 
closeDialog(CloseDialogEvent pEvent)
Closes an open dialog. 
 | 
void | 
dispose(Map<String,? super Object> pArgs)
Called from the peer that coordinates our life cycle to tell us to
 cleanup all resources. 
 | 
Dc | 
getActiveDialog()
Returns the last dialog that was opened by this DialogManager or null
 if there is currently no active dialog. 
 | 
List<Dc> | 
getActiveDialogs()
Returns a list of active dialog objects. 
 | 
void | 
openDialog(OpenDialogEvent pEvent)
Open a new dialog. 
 | 
void | 
openDialog(OpenDialogEvent pEvent,
          Dc pParent)
Open a new dialog. 
 | 
void | 
postAppEvent(Dc pDc,
            AppEventSupport pAppEventSupport,
            AppEvent pAppEvent)
Filter for an AppEvent hierarchy: if a OpenDialogEvent or an CloseDialogEvent is posted,
 we try to handle it. 
 | 
void | 
setCallback(DialogManager.DialogCallback pCallback)
Set the callback target for dialog callbacks. 
 | 
void | 
setKnownDialogs(Map<String,DialogDescription> pKnownDialogs)
Sets the known dialogs of this DialogManager. 
 | 
public DialogManager(Application pApp)
pApp - the application for the init() call if a dialog is createdpublic void setKnownDialogs(Map<String,DialogDescription> pKnownDialogs)
pKnownDialogs - a map of all known dialogs, must not be null;
                      key= dialog id as string,
                      value= dialog description objectpublic void setCallback(DialogManager.DialogCallback pCallback)
pCallback - the callback object, may be nullpublic Dc getActiveDialog()
public List<Dc> getActiveDialogs()
public void openDialog(OpenDialogEvent pEvent)
pEvent - the event describing the to be opened dialogpublic void openDialog(OpenDialogEvent pEvent, Dc pParent)
pEvent - the event describing the to be opened dialogpParent - null or the parent for the init() call if a dialog is created by dialog idpublic void closeDialog(CloseDialogEvent pEvent)
pEvent - the event describing the to be closed dialogpublic boolean canPassivate()
public void dispose(Map<String,? super Object> pArgs)
dispose in interface DisposablepArgs - arguments, key is a String, value is any suitable objekt for the keypublic void postAppEvent(Dc pDc, AppEventSupport pAppEventSupport, AppEvent pAppEvent)
pDc - the parent of the new dialog, may be nullpAppEventSupport - the (logical) parent in the AppEvent chain of responsabilitypAppEvent - event that should be routed/processes, must not be nullIllegalArgumentException - if pAppEvent is nullCopyright © 2017 Jürgen Zeller (privat). All rights reserved.