Package spin.demo.dispatcher
Class ConcealedDialogDispatcherFactory
java.lang.Object
spin.off.DialogDispatcherFactory
spin.demo.dispatcher.ConcealedDialogDispatcherFactory
- All Implemented Interfaces:
DispatcherFactory
Implementation of a dispatcher which uses a pool of modal dialogs to dispatch
events. The dialogs are concealed, i.e. they are located outside of the
visible screen area.
Note that the
While this seems to be a major drawback this class nevertheless has its eligibility:
Note that the
Dispatchers created by this class are not
usable for GUIs with Cancel functionality since they will
block user access to all windows of your application during dispatching.While this seems to be a major drawback this class nevertheless has its eligibility:
- It shows that Spin does no 'magic' nor any dirty tricks -
every shown
Dialogdoes the same. - If your application really needs a
Cancelfunctionality you should consider to use a real asynchronous solution as showed inspin.demo.async.AsyncGUI- please see also the caveat 'asynchronous'.
-
Nested Class Summary
Nested classes/interfaces inherited from class spin.off.DialogDispatcherFactory
DialogDispatcherFactory.DialogDispatcher -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DialogAquire a pooled dialog.protected DialogFactory method to create a new dialog.protected voidinitDialog(Dialog dialog) Initialize the given dialog.protected voidreleaseDialog(Dialog dialog) Release a pooled dialog.Methods inherited from class spin.off.DialogDispatcherFactory
createDispatcher
-
Constructor Details
-
ConcealedDialogDispatcherFactory
public ConcealedDialogDispatcherFactory()
-
-
Method Details
-
aquireDialog
Aquire a pooled dialog.- Specified by:
aquireDialogin classDialogDispatcherFactory- Returns:
- dialog
-
releaseDialog
Release a pooled dialog.- Specified by:
releaseDialogin classDialogDispatcherFactory- Parameters:
dialog- dialog to release
-
createDialog
Factory method to create a new dialog. Can be overriden to create a custom dialog.- Returns:
- created dialog.
-
initDialog
Initialize the given dialog.
This default implementation positions the dialog outside of the visible screen boundary.- Parameters:
dialog- dialog to initialize
-