spin.demo.dispatcher
Class RevealedDialogDispatcherFactory

java.lang.Object
  extended by spin.off.DialogDispatcherFactory
      extended by spin.demo.dispatcher.RevealedDialogDispatcherFactory
All Implemented Interfaces:
DispatcherFactory

public class RevealedDialogDispatcherFactory
extends DialogDispatcherFactory

Implementation of a dispatcher which uses dialogs to dispatch events.
Due to the inability to change the owner of a dialog (after creation) this class has to create a fresh dialog for each invocation on the bean. This admittedly inperformant behaviour could be improved by pooling the dialogs on a per-owner basis (e.g. utilizing a WeakHashMap).
Subclasse might want to offer cancel functionality, display real progress or show an animated image (e.g. the famous Netscape icon).

See Also:
aquireDialog(Window)

Nested Class Summary
 
Nested classes/interfaces inherited from class spin.off.DialogDispatcherFactory
DialogDispatcherFactory.DialogDispatcher
 
Constructor Summary
RevealedDialogDispatcherFactory()
           
 
Method Summary
protected  java.awt.Dialog aquireDialog()
          Aquire a dialog for the currently active window.
protected  java.awt.Dialog aquireDialog(java.awt.Window owner)
          Aquire a dialog for the given owning window.
protected  java.awt.Dialog createDialog(java.awt.Window owner)
          Create a dialog for the given owner.
protected  void initDialog(java.awt.Dialog dialog)
           
protected  void releaseDialog(java.awt.Dialog dialog)
          Factory method to implement by subclasses to release a dialog.
 
Methods inherited from class spin.off.DialogDispatcherFactory
createDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RevealedDialogDispatcherFactory

public RevealedDialogDispatcherFactory()
Method Detail

aquireDialog

protected java.awt.Dialog aquireDialog()
Aquire a dialog for the currently active window.

Specified by:
aquireDialog in class DialogDispatcherFactory
Returns:
dialog

aquireDialog

protected java.awt.Dialog aquireDialog(java.awt.Window owner)
Aquire a dialog for the given owning window.
This default implementation always creates a new dialog.

Parameters:
owner - owner to aquire dialog for
Returns:
aquired dialog
See Also:
createDialog(Window)

createDialog

protected java.awt.Dialog createDialog(java.awt.Window owner)
Create a dialog for the given owner.

Parameters:
owner - owner of dialog to create
Returns:
created dialog

initDialog

protected void initDialog(java.awt.Dialog dialog)

releaseDialog

protected void releaseDialog(java.awt.Dialog dialog)
Description copied from class: DialogDispatcherFactory
Factory method to implement by subclasses to release a dialog.

Specified by:
releaseDialog in class DialogDispatcherFactory
Parameters:
dialog - the dialog to release


Copyright © 2007. All Rights Reserved.