org.eodisp.ui.sm.controllers
Class SMAppController

java.lang.Object
  extended by org.eodisp.ui.common.base.EodispApplicationController
      extended by org.eodisp.ui.sm.controllers.SMAppController

public class SMAppController
extends EodispApplicationController

This is the application controller for the EODiSP simulation manager application. It is the main controller, which has control over the creation of other controllers. It is therfore the controller of the application which must exist in order to run the application.

Specific tasks which this controller is responsible for are:

The SimulationManagerAppController extends the more generic EodispApplicationController and is only useful to handle the specific part for the simulation manager application. All generic tasks are handled and documented in the EodispApplicationController class.

Version:
$Id: SimulationManagerAppController.java 1436 2006-01-04 08:16:08Z eglimi $
Author:
eglimi

Field Summary
(package private) static org.apache.log4j.Logger logger
          Log4J logger for this class
 
Fields inherited from class org.eodisp.ui.common.base.EodispApplicationController
rootWindow, viewMap
 
Constructor Summary
SMAppController()
          Default constructor.
 
Method Summary
protected  boolean canExit()
          Checks in all currently active frames if there is a model which has been changed and therefore needs to save before exiting.
protected  void createControllers()
          This constructs all frames included in the application.
protected  void createInitialLayout()
          This method can be used by sub-classes to create an initial layout.
protected  EodispMainFrame createMainFrame()
          Creates the main frame of the application.
 org.eclipse.emf.ecore.sdo.EDataObject getCurrentExperiment()
           
 void initialize()
          Initialization of the application controller.
 void onAbout(java.awt.event.ActionEvent e)
           
 void onConnectRepos(java.awt.event.ActionEvent e)
           
 void onDeleteExperiment(java.awt.event.ActionEvent e)
           
 void onExitApp(java.awt.event.ActionEvent e)
           
 void onHelp(java.awt.event.ActionEvent e)
           
 void onNewExperiment(java.awt.event.ActionEvent e)
           
 void onOpenExperiment(java.awt.event.ActionEvent e)
           
 void onPrefs(java.awt.event.ActionEvent e)
           
 void onRegisterApp(java.awt.event.ActionEvent e)
           
 void onReloadRepos(java.awt.event.ActionEvent e)
           
 void onSaveAll(java.awt.event.ActionEvent e)
           
 void onUnregisterApp(java.awt.event.ActionEvent e)
           
 void onUpdateRegistration(java.awt.event.ActionEvent e)
           
 void registerActionHandler()
          Register this class as a target handler for certain actions used within the EODiSP simulation manager application.
 
Methods inherited from class org.eodisp.ui.common.base.EodispApplicationController
attachController, createRootWindow, detachAllControllers, detachController, getChangedViewNames, getMainFrame, getRootWindow, handleExit, hasAppChanges, saveAllChanges, saveLayout, showDynamicView, updateAllActions, updateAllModels, updateAllViewStates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
Log4J logger for this class

Constructor Detail

SMAppController

public SMAppController()
Default constructor.

Method Detail

initialize

public void initialize()
Initialization of the application controller. This initialization sequence can be override by subclasses.

Overrides:
initialize in class EodispApplicationController

registerActionHandler

public void registerActionHandler()
Description copied from class: EodispApplicationController
Register this class as a target handler for certain actions used within the EODiSP simulation manager application.

For the registration, the EODiSP delegation mechanism is used (see EodispDelegate. Such an instance can be registered in the action itself, causing the method to be called whenever the action is performed.

Specified by:
registerActionHandler in class EodispApplicationController

onSaveAll

public void onSaveAll(java.awt.event.ActionEvent e)

onExitApp

public void onExitApp(java.awt.event.ActionEvent e)

onAbout

public void onAbout(java.awt.event.ActionEvent e)

onHelp

public void onHelp(java.awt.event.ActionEvent e)

onConnectRepos

public void onConnectRepos(java.awt.event.ActionEvent e)

onReloadRepos

public void onReloadRepos(java.awt.event.ActionEvent e)

onRegisterApp

public void onRegisterApp(java.awt.event.ActionEvent e)

onUpdateRegistration

public void onUpdateRegistration(java.awt.event.ActionEvent e)

onUnregisterApp

public void onUnregisterApp(java.awt.event.ActionEvent e)

onOpenExperiment

public void onOpenExperiment(java.awt.event.ActionEvent e)

onNewExperiment

public void onNewExperiment(java.awt.event.ActionEvent e)

onDeleteExperiment

public void onDeleteExperiment(java.awt.event.ActionEvent e)

onPrefs

public void onPrefs(java.awt.event.ActionEvent e)

createControllers

protected void createControllers()
This constructs all frames included in the application. It must be implemented by the specific application main controller.

Specified by:
createControllers in class EodispApplicationController

createMainFrame

protected EodispMainFrame createMainFrame()
Creates the main frame of the application. This method must be implemented by a concrete application controller for each application.

Specified by:
createMainFrame in class EodispApplicationController
Returns:
The main frame of this application.

createInitialLayout

protected void createInitialLayout()
This method can be used by sub-classes to create an initial layout. It will be called only the first time when there is no ui state file, or if an error occurs when reading the ui state file.

You do not need to call super().

Overrides:
createInitialLayout in class EodispApplicationController

getCurrentExperiment

public org.eclipse.emf.ecore.sdo.EDataObject getCurrentExperiment()
Returns:
Returns the currentExperiment.

canExit

protected boolean canExit()
Checks in all currently active frames if there is a model which has been changed and therefore needs to save before exiting.

The method checks if the view and a model exists.

Overrides:
canExit in class EodispApplicationController
Returns:
True, if the application can exit, false otherwise.