uk.ac.essex.ia.imageview
Class ImageViewer

java.lang.Object
  extended by uk.ac.essex.common.gui.ViewerImpl
      extended by uk.ac.essex.ia.imageview.ImageViewer
All Implemented Interfaces:
Viewer, ImageViewerConstants, IVPreferences

public class ImageViewer
extends ViewerImpl
implements ImageViewerConstants, IVPreferences

This singleton class handles displaying images it uses the class ApplicationFrame to create a skeleton for the GUI then this class creates all the main functionality.

See Also:
You should have received a copy of GNU public license with this code. If not please visit this site

Field Summary
static java.lang.String ACTION_XML_FILE
           
 
Fields inherited from class uk.ac.essex.common.gui.ViewerImpl
applicationFrame, editHandler, fileHandler, helpHandler, optionsHandler
 
Fields inherited from interface uk.ac.essex.ia.imageview.ImageViewerConstants
allViewsCommand, annotationCommand, currentViewCommand, defaultLevel, defaultWindow, histogramCommand, largestLevel, largestWindow, levelCommand, measurementCommand, nozoom, paramSync, RESOURCE_BASE_NAME, rotationCommand, setLayoutCommand, smallestLevel, smallestWindow, speedCommand, startCommand, statisticsCommand, stopCommand, windowCommand, zoomCommand
 
Fields inherited from interface uk.ac.essex.ia.imageview.pref.IVPreferences
CURRENT_DIRECTORY_NAME, CURRENT_FILE_NAME, FILE_LIST, LOAD_HISTOGRAM, LOAD_STATISTICS, RESTORE_SESSION, SHOW_EXPLORER_PANE
 
Method Summary
 void addMenus(ApplicationModel appModel)
          TODO
 void addToToolbar(javax.swing.Action[] actions)
          TODO
static ImageViewer getInstance()
           
 Interpreter getIntepreter()
           
protected  boolean isImage(java.io.File file)
          Is the file an image file.
static void main(java.lang.String[] args)
          Test method to test ImageViewer as a standalone application, eventually this will allow ImageViewer to be run as a seperate process for those not requiring OpViewer
 void restoreSession()
          This loads the GUI into the users prefered state
 void setVisible(boolean isVisible)
           
 void shutDown()
          Called to shut the Viewer down, this allows it to save open files etc.
 
Methods inherited from class uk.ac.essex.common.gui.ViewerImpl
getApplicationFrame, getEditHandler, getFileHandler, getHelpHandler, getOptionsHandler, restoreSessionFiles, saveOpenFiles, saveSessionFiles, shouldRestoreSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_XML_FILE

public static final java.lang.String ACTION_XML_FILE
See Also:
Constant Field Values
Method Detail

getInstance

public static ImageViewer getInstance()
Returns:
ImageViewer - The singleton instance

addMenus

public void addMenus(ApplicationModel appModel)
TODO


addToToolbar

public void addToToolbar(javax.swing.Action[] actions)
TODO


getIntepreter

public Interpreter getIntepreter()
Returns:
OperatorIntepreter

setVisible

public void setVisible(boolean isVisible)

shutDown

public void shutDown()
              throws ShutdownCancelledException
Called to shut the Viewer down, this allows it to save open files etc.

Specified by:
shutDown in interface Viewer
Overrides:
shutDown in class ViewerImpl
Throws:
ShutdownCancelledException

restoreSession

public void restoreSession()
This loads the GUI into the users prefered state

Specified by:
restoreSession in interface Viewer
Overrides:
restoreSession in class ViewerImpl

isImage

protected boolean isImage(java.io.File file)
Is the file an image file. This functions only checks the ending of the file name a and not the actual mime type

Parameters:
file - - The file to check
Returns:
boolean - true if the file is an image file, false otherwise

main

public static void main(java.lang.String[] args)
Test method to test ImageViewer as a standalone application, eventually this will allow ImageViewer to be run as a seperate process for those not requiring OpViewer