spin.demo.dispatcher

Class ConcealedDialogDispatcherFactory


public class ConcealedDialogDispatcherFactory
extends DialogDispatcherFactory

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 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:

Method Summary

protected Dialog
aquireDialog()
Aquire a pooled dialog.
protected Dialog
createDialog()
Factory method to create a new dialog.
protected void
initDialog(Dialog dialog)
Initialize the given dialog.
protected void
releaseDialog(Dialog dialog)
Release a pooled dialog.

Method Details

aquireDialog

protected Dialog aquireDialog()
Aquire a pooled dialog.
Returns:
dialog

createDialog

protected Dialog createDialog()
Factory method to create a new dialog. Can be overriden to create a custom dialog.
Returns:
created dialog.

initDialog

protected void initDialog(Dialog dialog)
Initialize the given dialog.
This default implementation positions the dialog outside of the visible screen boundary.
Parameters:
dialog - dialog to initialize

releaseDialog

protected void releaseDialog(Dialog dialog)
Release a pooled dialog.
Parameters:
dialog - dialog to release