frysk.gui.register
Class RegisterWindowFactory

java.lang.Object
  extended by frysk.gui.register.RegisterWindowFactory

public class RegisterWindowFactory
extends Object

Factory for creating RegisterWindows - allows multiple RegisterWindows to be instantiated for different processes, and disallows multiple windows on the same process. Uses a ProcBlockCounter to co-ordinate the un-blocking of the process between the Memory and SourceWindows if the other two are also running on that process. A singleton class dynamically creating RegisterWindows.


Nested Class Summary
private static class RegisterWindowFactory.RegWinListener
          A wrapper for LifeCycleListener which cleans up when the RegisterWindow is closed.
 
Field Summary
private static HashMap map
           
private static String REG_GLADE
           
static RegisterWindow regWin
           
private static HashMap seMap
           
 
Constructor Summary
RegisterWindowFactory()
           
 
Method Summary
static void createRegisterWindow(Proc proc, SteppingEngine steppingEngine)
          Performs checks to ensure no other RegisterWindow is running on this Task; if not, assigns a ProcBlockCounter and attaches an Observer if there is no other Window already running on this Task.
static void setRegWin(Proc proc)
          Used by the SourceWindow to assign the static regWin object which it uses to ensure there is only one RegisterWindow running for its Task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regWin

public static RegisterWindow regWin

map

private static HashMap map

seMap

private static HashMap seMap

REG_GLADE

private static final String REG_GLADE
See Also:
Constant Field Values
Constructor Detail

RegisterWindowFactory

public RegisterWindowFactory()
Method Detail

createRegisterWindow

public static void createRegisterWindow(Proc proc,
                                        SteppingEngine steppingEngine)
Performs checks to ensure no other RegisterWindow is running on this Task; if not, assigns a ProcBlockCounter and attaches an Observer if there is no other Window already running on this Task.

Parameters:
proc - The Proc to be examined by the new RegisterWindow.

setRegWin

public static void setRegWin(Proc proc)
Used by the SourceWindow to assign the static regWin object which it uses to ensure there is only one RegisterWindow running for its Task.

Parameters:
proc - The Proc used to find the RegisterWindow representing it.