frysk.gui.srcwin
Class SourceWindowFactory

java.lang.Object
  extended by frysk.gui.srcwin.SourceWindowFactory

public class SourceWindowFactory
extends Object

SourceWindow factory is the interface through which all SourceWindow objects in frysk should be created. It takes care of setting paths to resource files as well as making sure that at most one window is opened per Task. A singleton class dynamically creating SourceWindows.


Nested Class Summary
protected static class SourceWindowFactory.AttachedObserver
           
private static class SourceWindowFactory.SourceWinListener
           
 
Field Summary
static Task myTask
           
static SourceWindowFactory.AttachedObserver newProcObserver
           
protected static SourceWindow srcWin
           
 
Constructor Summary
SourceWindowFactory()
           
 
Method Summary
static void attachToCore(File coreFile)
           
static void createSourceWindow(DebugInfoFrame frame)
           
static void createSourceWindow(DebugInfoFrame[] frames)
           
static void createSourceWindow(Proc proc)
          Creates a new source window using the given task.
static void createSourceWindow(Proc[] procs)
           
static void printDOM(DOMFrysk dom)
          Print out the DOM in XML format
static void removeAttachedObserver(Task task, SourceWindowFactory.AttachedObserver attachedObserver)
           
static SourceWindowFactory.AttachedObserver startNewProc(String file, String env_variables, String options, String stdin, String stdout, String stderr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

srcWin

protected static SourceWindow srcWin

myTask

public static Task myTask

newProcObserver

public static SourceWindowFactory.AttachedObserver newProcObserver
Constructor Detail

SourceWindowFactory

public SourceWindowFactory()
Method Detail

createSourceWindow

public static void createSourceWindow(Proc proc)
Creates a new source window using the given task. The SourceWindows correspond to tasks in a 1-1 relationship, so if you try to launch a SourceWindow for a Task and an existing window has already been created, that one will be brought to the forefront rather than creating a new window.

Parameters:
proc - The Proc to open a SourceWindow for.

createSourceWindow

public static void createSourceWindow(Proc[] procs)

createSourceWindow

public static void createSourceWindow(DebugInfoFrame frame)

createSourceWindow

public static void createSourceWindow(DebugInfoFrame[] frames)

attachToCore

public static void attachToCore(File coreFile)

startNewProc

public static SourceWindowFactory.AttachedObserver startNewProc(String file,
                                                                String env_variables,
                                                                String options,
                                                                String stdin,
                                                                String stdout,
                                                                String stderr)

printDOM

public static void printDOM(DOMFrysk dom)
Print out the DOM in XML format

Parameters:
dom - The DOMFrysk to output.

removeAttachedObserver

public static void removeAttachedObserver(Task task,
                                          SourceWindowFactory.AttachedObserver attachedObserver)