org.esa.beam.framework.processor.ui
Class ProcessorApp

java.lang.Object
  extended by org.esa.beam.framework.ui.BasicApp
      extended by org.esa.beam.framework.processor.ui.ProcessorApp

public class ProcessorApp
extends BasicApp

This class serves as the main processor UI frame shared by all processors. It provides Request load and save operations and the basic button set. This class mediates the communication between processor and processor UI.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.esa.beam.framework.ui.BasicApp
BasicApp.MainFrame
 
Field Summary
static String INPUT_PRODUCT_DIR_PREFERENCES_KEY
           
static String OUTPUT_PRODUCT_DIR_PREFERENCES_KEY
           
static String REQUEST_DIR_PREFERENCES_KEY
           
 
Fields inherited from class org.esa.beam.framework.ui.BasicApp
MEMORY_STATUS_BAR_ITEM_KEY, MESSAGE_STATUS_BAR_ITEM_KEY, OVRINS_STATUS_BAR_ITEM_KEY, POSITION_STATUS_BAR_ITEM_KEY, PROPERTY_KEY_APP_DEBUG_ENABLED, PROPERTY_KEY_APP_LAST_OPEN_DIR, PROPERTY_KEY_APP_LAST_OPEN_FORMAT, PROPERTY_KEY_APP_LAST_SAVE_DIR, PROPERTY_KEY_APP_LOG_ECHO, PROPERTY_KEY_APP_LOG_ENABLED, PROPERTY_KEY_APP_LOG_LEVEL, PROPERTY_KEY_APP_LOG_PREFIX, PROPERTY_KEY_APP_UI_FONT_NAME, PROPERTY_KEY_APP_UI_FONT_SIZE, PROPERTY_KEY_APP_UI_LAF, PROPERTY_KEY_APP_UI_USE_SYSTEM_FONT_SETTINGS, TIME_STATUS_BAR_ITEM_KEY
 
Constructor Summary
ProcessorApp(Processor processor)
          Constructs the object with given processor
ProcessorApp(Processor processor, RequestLoader loader)
          Constructs the object with given processor and logwriter
 
Method Summary
 void addRequestValidator(RequestValidator requestValidator)
           
protected  com.jidesoft.action.CommandBar createMainMenuBar()
          Creates the menu bar, attaches it to the main frame and adds the action listeners.
protected  JComponent createMainPane()
          Creates the main pane for this application.
 AbstractButton getHelpButton()
           
 Processor getProcessor()
          Gets the associated processor.
 Vector getRequests()
          Retrieves the requests currently used by the processor
 RequestValidator[] getRequestValidators()
           
protected  void initClient(com.bc.ceres.core.ProgressMonitor pm)
          Runs the application.
protected  void initClientUI(com.bc.ceres.core.ProgressMonitor pm)
          This method can be overridden in order to initialize a client user interface.
 boolean isStandAlone()
          Determines whether or not this processor application runs in stand-alone mode.
 void markIODirChanges(ParamGroup paramGroup)
           
 void markParentDirChanges(Parameter parameter, String preferencesKey)
           
 void markParentDirChanges(ParamGroup paramGroup, String paramName, String preferencesKey)
           
 void processingAborted()
          Called if the current processing request has been aborted.
 void processingCompleted()
          Called if the current processing request has been successfully completed.
 void processingFailed()
          Called if a processing error occurred.
 boolean removeRequestValidator(RequestValidator requestValidator)
           
 void setHelpID(String helpID)
           
 void setRequests(Vector requests)
          Injects a list of requests to the processorUI.
 void setStandAlone(boolean standAlone)
          Sets whether or not this processor application runs in stand-alone mode.
 
Methods inherited from class org.esa.beam.framework.ui.BasicApp
addHelp, applyLookAndFeelPreferences, applyPreferences, center, clearStatusBarMessage, configureCommandsByResourceBundle, createFrameIcon, createJMenu, createMainToolBar, createStatusBar, createToolBar, findMainMenu, findMenu, findMenu, getAppBuildInfo, getAppCopyright, getApplicationDescriptor, getAppName, getAppSymbolicName, getAppVersion, getCloseHandler, getCommandManager, getCommandUIFactory, getFileHistory, getImageResourcePath, getLogger, getMainFrame, getMainToolBar, getMouseOverActionHandler, getPreferences, getPreferencesFile, getResourceBundle, getStatusBar, getStatusBarMessage, getSuppressibleOptionPane, getToolBar, getToolBarGroups, handleImminentExit, handleUnknownException, historyPush, insertCommandMenuItem, insertCommandMenuItems, insertCommandToolBarButtons, isFrameBoundsRestored, isShuttingDown, isStartedUp, isStatusBarVisible, isToolBarVisible, loadPreferences, promptForOverwrite, registerJob, savePreferences, setCloseHandler, setCommandManager, setCurrentDocTitle, setPreferences, setShuttingDown, setStatusBarMessage, setStatusBarVisible, setToolBarVisible, setToolBarVisible, showErrorDialog, showErrorDialog, showFileOpenDialog, showFileOpenDialog, showFileSaveDialog, showFileSaveDialog, showInfoDialog, showInfoDialog, showMessageDialog, showOutOfMemoryErrorDialog, showQuestionDialog, showQuestionDialog, showQuestionDialog, showWarningDialog, showWarningDialog, showWarningsDialog, shutDown, startUp, unregisterJob, updateComponentTreeUI, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_DIR_PREFERENCES_KEY

public static final String REQUEST_DIR_PREFERENCES_KEY
See Also:
Constant Field Values

INPUT_PRODUCT_DIR_PREFERENCES_KEY

public static final String INPUT_PRODUCT_DIR_PREFERENCES_KEY
See Also:
Constant Field Values

OUTPUT_PRODUCT_DIR_PREFERENCES_KEY

public static final String OUTPUT_PRODUCT_DIR_PREFERENCES_KEY
See Also:
Constant Field Values
Constructor Detail

ProcessorApp

public ProcessorApp(Processor processor,
                    RequestLoader loader)
Constructs the object with given processor and logwriter

Parameters:
processor - the processor run by the ProcessorApp
loader - the request loader to be used (can be null)

ProcessorApp

public ProcessorApp(Processor processor)
Constructs the object with given processor

Parameters:
processor - the processor run by the ProcessorApp
Method Detail

getProcessor

public Processor getProcessor()
Gets the associated processor.

Returns:
the processor
Since:
4.1

getRequestValidators

public RequestValidator[] getRequestValidators()
Returns:
never null

addRequestValidator

public void addRequestValidator(RequestValidator requestValidator)

removeRequestValidator

public boolean removeRequestValidator(RequestValidator requestValidator)

setStandAlone

public void setStandAlone(boolean standAlone)
Sets whether or not this processor application runs in stand-alone mode. Must be called before BasicApp.startUp(com.bc.ceres.core.ProgressMonitor) is called.

Parameters:
standAlone - whether or not this processor application runs in stand alone mode.

isStandAlone

public boolean isStandAlone()
Determines whether or not this processor application runs in stand-alone mode.

Returns:
true, if so.

initClient

protected void initClient(com.bc.ceres.core.ProgressMonitor pm)
                   throws Exception
Runs the application.

Overrides:
initClient in class BasicApp
Parameters:
pm - a progress monitor, can be used to signal progress
Throws:
Exception - if an error occurs

initClientUI

protected void initClientUI(com.bc.ceres.core.ProgressMonitor pm)
                     throws Exception
This method can be overridden in order to initialize a client user interface. It is called from the BasicApp.startUp(com.bc.ceres.core.ProgressMonitor) method before the BasicApp.applyPreferences() is called and before an optional splash-screen closes and the main frame becomes visible.

Overrides:
initClientUI in class BasicApp
Parameters:
pm - A monitor to indicate progress.
Throws:
Exception - if an error occurs

createMainMenuBar

protected com.jidesoft.action.CommandBar createMainMenuBar()
Creates the menu bar, attaches it to the main frame and adds the action listeners.

Overrides:
createMainMenuBar in class BasicApp
Returns:
the menu bar for this application.

createMainPane

protected JComponent createMainPane()
Creates the main pane for this application.

Overrides:
createMainPane in class BasicApp
Returns:
the main pane for this application.

processingCompleted

public void processingCompleted()
Called if the current processing request has been successfully completed. Shows a dialog stating the successful processing.


processingAborted

public void processingAborted()
Called if the current processing request has been aborted.


processingFailed

public void processingFailed()
Called if a processing error occurred.


getRequests

public Vector getRequests()
                   throws ProcessorException
Retrieves the requests currently used by the processor

Returns:
The requests processsed by the processor.
Throws:
ProcessorException - If an error occurs.

setRequests

public void setRequests(Vector requests)
                 throws ProcessorException
Injects a list of requests to the processorUI.

Parameters:
requests - Sets the requests to be processed by the processor
Throws:
ProcessorException - If an error occurs.

markIODirChanges

public void markIODirChanges(ParamGroup paramGroup)

markParentDirChanges

public void markParentDirChanges(ParamGroup paramGroup,
                                 String paramName,
                                 String preferencesKey)

markParentDirChanges

public void markParentDirChanges(Parameter parameter,
                                 String preferencesKey)

getHelpButton

public AbstractButton getHelpButton()

setHelpID

public void setHelpID(String helpID)


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.