textbender.o.awt
Class WindowX.SpoolTie

java.lang.Object
  extended by WindowX.SpoolTie
Enclosing class:
WindowX

public static final class WindowX.SpoolTie
extends Object

Ties the disposal of a window to the unwinding of a spool. When either window or spool is disposed/unwound, the other is too.

Merely closing the window (e.g. making it invisible, without disposing of it) will have no effect on the spool. Not unless you also tie window disposal to window closure, e.g. with JDialog/JFrame.setDefaultCloseOperation( WindowConstants.DISPOSE_ON_CLOSE ).

Unlike a normal window, you cannot reuse a spool-tied window after disposal; not if anything critical was unwound from the spool.


Constructor Summary
WindowX.SpoolTie(Window window, Spool spool)
          Creates a SpoolTie. /** You must call addListeners() to activate it.
 
Method Summary
 WindowX.SpoolTie addListeners()
          Cross-registers listeners between window and spool, to activate the tie.
 void removeListeners()
          Unregisters listeners.
 Spool spool()
          Returns the spool of this window/spool tie.
 Window window()
          Returns the the window of this window/hold-stack tie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowX.SpoolTie

public WindowX.SpoolTie(Window window,
                        Spool spool)
Creates a SpoolTie. /** You must call addListeners() to activate it.

Method Detail

addListeners

public WindowX.SpoolTie addListeners()
Cross-registers listeners between window and spool, to activate the tie.

Returns:
this agent
See Also:
removeListeners()

spool

public Spool spool()
Returns the spool of this window/spool tie.


removeListeners

public void removeListeners()
Unregisters listeners.

See Also:
addListeners()

window

public Window window()
Returns the the window of this window/hold-stack tie.