net.sf.rej.gui
Class SystemFacade

java.lang.Object
  extended by net.sf.rej.gui.SystemFacade
All Implemented Interfaces:
EventObserver

public class SystemFacade
extends java.lang.Object
implements EventObserver

Common entry point for ReJ GUI system level operations.

Author:
Sami Koivu

Method Summary
 void createNewArchiveProject(java.io.File archiveFile)
           
 void createNewClass(java.lang.String fullClassName, java.lang.String selectedFile)
           
 void exit()
          Exit application
 ClassFile getClassFile(ClassLocator classLocator)
           
 ClassFile getClassFile(java.lang.String filename)
          Return the ClassFile object of the selected file in the open project
 ClassIndex getClassIndex()
           
 FileSet getFileSet(java.io.File f)
           
static SystemFacade getInstance()
           
 MethodFactory getMethodFactory()
           
 Preferences getPreferences()
           
 ProgressMonitor getProgressMonitor()
          Return the Default GUI progress monitor
 java.util.List getRecentFiles()
           
 void goTo(Link link)
           
 void handleException(java.lang.Exception ex)
           
 void handleExceptions(java.util.List errors)
           
 void openFile(java.io.File f)
           
 void openProject(Project project)
           
 void performAction(Undoable action)
           
 void performAction(Undoable action, java.lang.String targetFile)
          Performs the action specified by action (by calling the execute() method) on the project file specified by targetFile.
 void performFind()
           
 void performProjectAction(Undoable action)
           
 void performProjectRedo()
           
 void performProjectUndo()
           
 void performRedo(java.lang.String targetFile)
           
 void performUndo(java.lang.String targetFile)
           
 void processEvent(Event event)
           
 void removeFile(java.util.List<java.lang.String> files)
           
 void saveFile()
           
 void saveFile(java.io.File file)
           
 void search(IteratorAgent matcher)
           
 void setProgress(int i)
           
 void setProgressScope(int min, int max)
           
 void setStatus(java.lang.String status)
           
 void setTitle()
           
 void setTitle(java.lang.String title)
           
 void showPreferencesDialog()
           
 void updateClassIndex()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SystemFacade getInstance()

showPreferencesDialog

public void showPreferencesDialog()

exit

public void exit()
Exit application


openFile

public void openFile(java.io.File f)

openProject

public void openProject(Project project)

saveFile

public void saveFile()

saveFile

public void saveFile(java.io.File file)

setProgress

public void setProgress(int i)

setProgressScope

public void setProgressScope(int min,
                             int max)

setStatus

public void setStatus(java.lang.String status)

handleException

public void handleException(java.lang.Exception ex)

handleExceptions

public void handleExceptions(java.util.List errors)

getFileSet

public FileSet getFileSet(java.io.File f)
                   throws java.io.IOException
Throws:
java.io.IOException

setTitle

public void setTitle(java.lang.String title)

setTitle

public void setTitle()

performAction

public void performAction(Undoable action)

performAction

public void performAction(Undoable action,
                          java.lang.String targetFile)
Performs the action specified by action (by calling the execute() method) on the project file specified by targetFile. The action is added to the UndoManager of the target file and project modified status is set accordingly. An application-wide CLASS_UPDATE notification is dispatched.

Parameters:
action - Undoable that is to be performed.
targetFile - the file on which the action is performed on.

performProjectAction

public void performProjectAction(Undoable action)

performUndo

public void performUndo(java.lang.String targetFile)

performRedo

public void performRedo(java.lang.String targetFile)

performProjectUndo

public void performProjectUndo()

performProjectRedo

public void performProjectRedo()

performFind

public void performFind()

removeFile

public void removeFile(java.util.List<java.lang.String> files)

getRecentFiles

public java.util.List getRecentFiles()

goTo

public void goTo(Link link)

search

public void search(IteratorAgent matcher)

getProgressMonitor

public ProgressMonitor getProgressMonitor()
Return the Default GUI progress monitor

Returns:
ProgressMonitor

getClassFile

public ClassFile getClassFile(java.lang.String filename)
                       throws java.io.IOException,
                              ClassParsingException
Return the ClassFile object of the selected file in the open project

Parameters:
filename -
Returns:
ClassFile The parsed ClassFile object
Throws:
java.io.IOException - I/O problem reading/parsing the ClassFile
ClassParsingException - Parsing Exception - the ClassFile was malformed

getClassFile

public ClassFile getClassFile(ClassLocator classLocator)
                       throws java.io.IOException,
                              ClassParsingException
Throws:
java.io.IOException
ClassParsingException

getClassIndex

public ClassIndex getClassIndex()

updateClassIndex

public void updateClassIndex()

createNewArchiveProject

public void createNewArchiveProject(java.io.File archiveFile)

createNewClass

public void createNewClass(java.lang.String fullClassName,
                           java.lang.String selectedFile)

getMethodFactory

public MethodFactory getMethodFactory()

processEvent

public void processEvent(Event event)
Specified by:
processEvent in interface EventObserver

getPreferences

public Preferences getPreferences()