org.esa.beam.visat
Class VisatApp

java.lang.Object
  extended by org.esa.beam.framework.ui.BasicApp
      extended by org.esa.beam.visat.VisatApp
All Implemented Interfaces:
AppContext

public class VisatApp
extends BasicApp
implements AppContext

The VisatApp class represents the VISAT application.

Version:
$Revision$ $Date$
Author:
Norman Fomferra, Marco Peters, Sabine Embacher

Nested Class Summary
static interface VisatApp.ViewUpdateMethod
          A method used to update a ProductSceneView.
 
Nested classes/interfaces inherited from class org.esa.beam.framework.ui.BasicApp
BasicApp.MainFrame
 
Field Summary
static String ALL_FILES_IDENTIFIER
           
static String ANALYSIS_TOOL_BAR_ID
           
static String APP_DEFAULT_PLUGIN_DIR
          Deprecated. since BEAM 4.11, plugin directory is not used anymore
static boolean DEFAULT_VALUE_SAVE_INCREMENTAL
          default value for preference incremental mode at save
static boolean DEFAULT_VALUE_SAVE_PRODUCT_ANNOTATIONS
          default value for preference save product annotations (ADS) or not
static boolean DEFAULT_VALUE_SAVE_PRODUCT_HEADERS
          default value for preference save product headers (MPH, SPH) or not
static boolean DEFAULT_VALUE_SAVE_PRODUCT_HISTORY
          default value for preference save product history (History) or not
static String INTERACTIONS_TOOL_BAR_ID
           
static String LAYERS_TOOL_BAR_ID
           
static String MAIN_TOOL_BAR_ID
           
static boolean PROPERTY_DEFAULT_DISPLAY_GEOLOCATION_AS_DECIMAL
          Default value for display style of geo-locations.
static double PROPERTY_DEFAULT_GEOLOCATION_EPS
          Preferences key for geo-location epsilon
static float PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY
          Default value for pixel offset's for display pixel positions
static boolean PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS
          Default value for pixel offset's for display pixel positions
static String PROPERTY_KEY_AUTO_SHOW_MAGNIFIER
          Preferences key for automatically showing magnifier
static String PROPERTY_KEY_AUTO_SHOW_NAVIGATION
          Preferences key for automatically showing navigation
static String PROPERTY_KEY_AUTO_SHOW_NEW_BANDS
          Preferences key for automatically showing new bands
static String PROPERTY_KEY_DISPLAY_GEOLOCATION_AS_DECIMAL
          Preferences key for display style of geo-locations
static String PROPERTY_KEY_GEOLOCATION_EPS
          Preferences key for geo-location epsilon
static String PROPERTY_KEY_JAI_TILE_CACHE_CAPACITY
          Preferences key for the memory capacity of the JAI tile cache in megabytes
static String PROPERTY_KEY_LOW_MEMORY_LIMIT
          Preferences key for low memory size
static String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS
          Preferences key for pixel offset-Y for display pixel positions
static String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_X
          Preferences key for pixel offset-X for display pixel positions
static String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_Y
          Preferences key for pixel offset-Y for display pixel positions
static String PROPERTY_KEY_SAVE_INCREMENTAL
          Preferences key for incremental mode at save
static String PROPERTY_KEY_SAVE_PRODUCT_ANNOTATIONS
          Preferences key for save product annotations (ADS) or not
static String PROPERTY_KEY_SAVE_PRODUCT_HEADERS
          Preferences key for save product headers (MPH, SPH) or not
static String PROPERTY_KEY_SAVE_PRODUCT_HISTORY
          Preferences key for save product history or not
static String PROPERTY_KEY_VERSION_CHECK_DONT_ASK
          Preferences key for on-line version question
static String PROPERTY_KEY_VERSION_CHECK_ENABLED
          Preferences key for on-line version check
static String VIEWS_TOOL_BAR_ID
           
 
Fields inherited from class org.esa.beam.framework.ui.BasicApp
MESSAGE_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
 
Constructor Summary
VisatApp(ApplicationDescriptor applicationDescriptor)
          Constructs the VISAT application instance.
 
Method Summary
 void addInternalFrameListener(InternalFrameListener listener)
          Adds an internal frame listener to VISAT.
 void addProduct(Product product)
          Adds the given product to VISAT's internal open product list.
 void addProductTreeListener(ProductTreeListener listener)
          Adds a product tree listener to VISAT.
 void addPropertyMapChangeListener(PropertyMapChangeListener listener)
          Adds a property map change listener to VISAT.
protected  void applyPreferences()
           
 void clearStatusBarMessage()
          Clears the status bar message.
 void closeAllAssociatedFrames(Product product)
          Closes all (internal) frames associated with the given product.
 void closeAllProducts()
          Closes the all open products.
 void closeProduct(Product product)
          Closes the given product.
 void closeSelectedProduct()
          Closes the currently selected product.
protected  ModalDialog createAboutBox()
           
 JInternalFrame createInternalFrame(String title, Icon icon, JComponent content, String helpId)
          Deprecated. Since BEAM 4.10, use createInternalFrame(String, javax.swing.Icon, javax.swing.JComponent, String, boolean) instead
 JInternalFrame createInternalFrame(String title, Icon icon, JComponent content, String helpId, boolean maximizeFrame)
          Creates an internal frame and adds it to VISAT's desktop.
protected  com.jidesoft.action.CommandBar createMainMenuBar()
          Overrides the base class version in order to creates the menu bar for VISAT.
protected  JComponent createMainPane()
          Overrides the base class version in order to create and configure the VISAT's main pane.
protected  com.jidesoft.action.CommandBar createMainToolBar()
          Overrides the base class version in order to create a tool bar for VISAT.
protected  com.jidesoft.status.StatusBar createStatusBar()
          Creates a standard status bar for this application.
 AbstractButton createToolButton(String commandID)
          Creates a tool button for the tool-command with the given command ID.
 void disposeProduct(Product product)
          Removes and disposes the given product and performs a garbage collection.
 JInternalFrame findInternalFrame(MetadataElement metadataElement)
          Finds the (internal) frame for the given meta data element.
 JInternalFrame findInternalFrame(ProductNode productNode)
          Finds the (internal) frame for the given product node.
 JInternalFrame findInternalFrame(RasterDataNode raster)
          Finds the any internal frame for the given raster data node.
 JInternalFrame[] findInternalFrames(RasterDataNode raster)
          Finds the (internal) frames for the given raster data node.
 JInternalFrame[] findInternalFrames(RasterDataNode raster, int numBands)
          Finds the (internal) frames for the given raster data node.
 com.bc.ceres.swing.figure.Interactor getActiveInteractor()
           
 JInternalFrame[] getAllInternalFrames()
          Returns all open (internal) frames VISAT currently has.
static VisatApp getApp()
          Returns the one and only VISAT application instance (singleton).
 String getApplicationName()
           
 VisatApplicationPage getApplicationPage()
           
 Window getApplicationWindow()
           
 com.bc.swing.desktop.TabbedDesktopPane getDesktopPane()
           
 ExecutorService getExecutorService()
           
 Product getOpenProduct(File file)
          Finds the product associated with the given file.
 VisatPreferencesDialog getPreferencesDialog()
           
 ProductManager getProductManager()
          Returns the product manager which holds the list of currently open products.
static ProductNode getProductNode(JInternalFrame frame)
          Returns the product node cuurrently displayed in the given internal frame.
 ProductTree getProductTree()
          Returns VISAT's product tree browser.
 JInternalFrame getSelectedInternalFrame()
           
 Product getSelectedProduct()
          Returns the currently selected product.
 ProductMetadataView getSelectedProductMetadataView()
          Returns the selected product metadata view.
 ProductNode getSelectedProductNode()
          Returns the currently selected node within a product.
 ProductNodeView getSelectedProductNodeView()
          Returns the selected product node view.
 ProductSceneView getSelectedProductSceneView()
          Returns the selected product scene view.
 File getSessionFile()
           
 void handleError(String message, Throwable t)
           
protected  void handleImminentExit()
          Resets the singleton application instance so that getApp() will return null after this method has been called.
 boolean hasRasterProductSceneView(RasterDataNode raster)
          Returns true if the given raster data node is used in any product scene view.
protected  void historyPush(File file)
           
protected  void initClient(com.bc.ceres.core.ProgressMonitor pm)
          Starts up the client application.
protected  void initClientUI(com.bc.ceres.core.ProgressMonitor pm)
          Initializes the client user interface.
protected  void insertCommandMenuItems()
           
 Product newProduct()
           
 void openProduct(File file)
           
 void openProductSceneView(RasterDataNode raster)
          Creates a new product scene view and opens an internal frame for it.
 void openProductSceneViewRGB(Product product, String helpId)
          Asks the user to select or define a RGB profile from which the product scene view will be created and opend as internal frame.
 void removeInternalFrameListener(InternalFrameListener listener)
          Removes an internal frame listener from VISAT.
 void removeProduct(Product product)
          Removes the given product from VISAT's internal open product list.
 void removeProductTreeListener(ProductTreeListener listener)
          Removes a product tree listener from VISAT.
 void removePropertyMapChangeListener(PropertyMapChangeListener listener)
          Removes a property map change listener from VISAT.
 void saveProduct(Product product)
          Saves the given product using its current file path.
 void saveProductAs(Product product)
          Prompts the user to enter a new file name and saves the given product under this new file name.
 void saveSelectedProduct()
          Saves the currently selected product using its current file path.
 void saveSelectedProductAs()
          Prompts the user to enter a new file name and saves the currently selected product under this new file name.
 void setActiveInteractor(com.bc.ceres.swing.figure.Interactor interactor)
           
 void setSelectedProductNode(JInternalFrame frame)
          Sets the selected product node to the node displyed in the given internal frame.
 void setSelectedProductNode(ProductNode selectedNode)
          Sets the currently selected node.
 void setSessionFile(File sessionFile)
          Sets the file of the current session.
 void setVisatExitConfirmed(boolean visatExitConfirmed)
           
 void showAboutBox()
          Shows VISAT's about box.
 void showPreferencesDialog(String helpId)
           
 void shutDown()
          Exits the application.
 void unloadAllAssociatedBands(Product product)
          Unloads all bands of the given product.
 void updateAssociatedViews(RasterDataNode[] rasters, VisatApp.ViewUpdateMethod updateMethod)
           
protected  void updateComponentTreeUI()
          Called after the look & feel has changed.
 void updateImage(ProductSceneView view)
           
 void updateImages(RasterDataNode[] rasters)
           
 void updateMainFrameTitle()
          Updates the main frame's document title.
 boolean writeProduct(Product product, File file, String formatName)
           
 
Methods inherited from class org.esa.beam.framework.ui.BasicApp
addHelp, applyLookAndFeelPreferences, center, configureCommandsByResourceBundle, createFrameIcon, createJMenu, 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, handleUnknownException, insertCommandMenuItem, insertCommandToolBarButtons, isFrameBoundsRestored, isShuttingDown, isStartedUp, isStatusBarVisible, isToolBarVisible, loadPreferences, promptForOverwrite, registerJob, savePreferences, setCloseHandler, setCommandManager, setCurrentDocTitle, setPreferences, setShuttingDown, setStatusBarMessage, setStatusBarVisible, setToolBarVisible, showErrorDialog, showErrorDialog, showFileOpenDialog, showFileOpenDialog, showFileSaveDialog, showFileSaveDialog, showInfoDialog, showInfoDialog, showMessageDialog, showOutOfMemoryErrorDialog, showQuestionDialog, showQuestionDialog, showQuestionDialog, showWarningDialog, showWarningDialog, showWarningsDialog, startUp, unregisterJob, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.esa.beam.framework.ui.AppContext
getPreferences
 

Field Detail

APP_DEFAULT_PLUGIN_DIR

@Deprecated
public static final String APP_DEFAULT_PLUGIN_DIR
Deprecated. since BEAM 4.11, plugin directory is not used anymore
VISAT's plug-in directory

See Also:
Constant Field Values

PROPERTY_KEY_SAVE_PRODUCT_HEADERS

public static final String PROPERTY_KEY_SAVE_PRODUCT_HEADERS
Preferences key for save product headers (MPH, SPH) or not

See Also:
Constant Field Values

PROPERTY_KEY_SAVE_PRODUCT_HISTORY

public static final String PROPERTY_KEY_SAVE_PRODUCT_HISTORY
Preferences key for save product history or not

See Also:
Constant Field Values

PROPERTY_KEY_SAVE_PRODUCT_ANNOTATIONS

public static final String PROPERTY_KEY_SAVE_PRODUCT_ANNOTATIONS
Preferences key for save product annotations (ADS) or not

See Also:
Constant Field Values

PROPERTY_KEY_GEOLOCATION_EPS

public static final String PROPERTY_KEY_GEOLOCATION_EPS
Preferences key for geo-location epsilon

See Also:
Constant Field Values

PROPERTY_DEFAULT_GEOLOCATION_EPS

public static final double PROPERTY_DEFAULT_GEOLOCATION_EPS
Preferences key for geo-location epsilon

See Also:
Constant Field Values

PROPERTY_KEY_SAVE_INCREMENTAL

public static final String PROPERTY_KEY_SAVE_INCREMENTAL
Preferences key for incremental mode at save

See Also:
Constant Field Values

PROPERTY_KEY_LOW_MEMORY_LIMIT

public static final String PROPERTY_KEY_LOW_MEMORY_LIMIT
Preferences key for low memory size

See Also:
Constant Field Values

PROPERTY_KEY_JAI_TILE_CACHE_CAPACITY

public static final String PROPERTY_KEY_JAI_TILE_CACHE_CAPACITY
Preferences key for the memory capacity of the JAI tile cache in megabytes

See Also:
Constant Field Values

PROPERTY_KEY_AUTO_SHOW_NEW_BANDS

public static final String PROPERTY_KEY_AUTO_SHOW_NEW_BANDS
Preferences key for automatically showing new bands

See Also:
Constant Field Values

PROPERTY_KEY_AUTO_SHOW_MAGNIFIER

public static final String PROPERTY_KEY_AUTO_SHOW_MAGNIFIER
Preferences key for automatically showing magnifier

See Also:
Constant Field Values

PROPERTY_KEY_AUTO_SHOW_NAVIGATION

public static final String PROPERTY_KEY_AUTO_SHOW_NAVIGATION
Preferences key for automatically showing navigation

See Also:
Constant Field Values

PROPERTY_KEY_VERSION_CHECK_ENABLED

public static final String PROPERTY_KEY_VERSION_CHECK_ENABLED
Preferences key for on-line version check

See Also:
Constant Field Values

PROPERTY_KEY_VERSION_CHECK_DONT_ASK

public static final String PROPERTY_KEY_VERSION_CHECK_DONT_ASK
Preferences key for on-line version question

See Also:
Constant Field Values

PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_X

public static final String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_X
Preferences key for pixel offset-X for display pixel positions

See Also:
Constant Field Values

PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_Y

public static final String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_Y
Preferences key for pixel offset-Y for display pixel positions

See Also:
Constant Field Values

PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY

public static final float PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY
Default value for pixel offset's for display pixel positions

See Also:
Constant Field Values

PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS

public static final String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS
Preferences key for pixel offset-Y for display pixel positions

See Also:
Constant Field Values

PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS

public static final boolean PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS
Default value for pixel offset's for display pixel positions

See Also:
Constant Field Values

PROPERTY_KEY_DISPLAY_GEOLOCATION_AS_DECIMAL

public static final String PROPERTY_KEY_DISPLAY_GEOLOCATION_AS_DECIMAL
Preferences key for display style of geo-locations

See Also:
Constant Field Values

PROPERTY_DEFAULT_DISPLAY_GEOLOCATION_AS_DECIMAL

public static final boolean PROPERTY_DEFAULT_DISPLAY_GEOLOCATION_AS_DECIMAL
Default value for display style of geo-locations.

See Also:
Constant Field Values

DEFAULT_VALUE_SAVE_PRODUCT_ANNOTATIONS

public static final boolean DEFAULT_VALUE_SAVE_PRODUCT_ANNOTATIONS
default value for preference save product annotations (ADS) or not

See Also:
Constant Field Values

DEFAULT_VALUE_SAVE_INCREMENTAL

public static final boolean DEFAULT_VALUE_SAVE_INCREMENTAL
default value for preference incremental mode at save

See Also:
Constant Field Values

DEFAULT_VALUE_SAVE_PRODUCT_HEADERS

public static final boolean DEFAULT_VALUE_SAVE_PRODUCT_HEADERS
default value for preference save product headers (MPH, SPH) or not

See Also:
Constant Field Values

DEFAULT_VALUE_SAVE_PRODUCT_HISTORY

public static final boolean DEFAULT_VALUE_SAVE_PRODUCT_HISTORY
default value for preference save product history (History) or not

See Also:
Constant Field Values

ALL_FILES_IDENTIFIER

public static final String ALL_FILES_IDENTIFIER
See Also:
Constant Field Values

MAIN_TOOL_BAR_ID

public static final String MAIN_TOOL_BAR_ID
See Also:
Constant Field Values

VIEWS_TOOL_BAR_ID

public static final String VIEWS_TOOL_BAR_ID
See Also:
Constant Field Values

INTERACTIONS_TOOL_BAR_ID

public static final String INTERACTIONS_TOOL_BAR_ID
See Also:
Constant Field Values

ANALYSIS_TOOL_BAR_ID

public static final String ANALYSIS_TOOL_BAR_ID
See Also:
Constant Field Values

LAYERS_TOOL_BAR_ID

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

VisatApp

public VisatApp(ApplicationDescriptor applicationDescriptor)
Constructs the VISAT application instance. The constructor does not start the application nor does it perform any GUI work.

Parameters:
applicationDescriptor - The application descriptor.
Method Detail

initClient

protected void initClient(com.bc.ceres.core.ProgressMonitor pm)
Description copied from class: BasicApp
Starts up the client application.

Called from BasicApp.startUp(com.bc.ceres.core.ProgressMonitor) before BasicApp.initClientUI(com.bc.ceres.core.ProgressMonitor) is called.

Clients should override this method in order to initialize non-UI components, e.g. load plugins.

The default implementation does nothing.

Overrides:
initClient in class BasicApp
Parameters:
pm - a progress monitor, can be used to signal progress

getActiveInteractor

public com.bc.ceres.swing.figure.Interactor getActiveInteractor()

setActiveInteractor

public void setActiveInteractor(com.bc.ceres.swing.figure.Interactor interactor)

getApplicationName

public String getApplicationName()
Specified by:
getApplicationName in interface AppContext

getApplicationWindow

public Window getApplicationWindow()
Specified by:
getApplicationWindow in interface AppContext

handleError

public void handleError(String message,
                        Throwable t)
Specified by:
handleError in interface AppContext

initClientUI

protected void initClientUI(com.bc.ceres.core.ProgressMonitor pm)
Description copied from class: BasicApp
Initializes the client user interface.

Called from BasicApp.startUp(com.bc.ceres.core.ProgressMonitor) after BasicApp.initClient(com.bc.ceres.core.ProgressMonitor) is called.

Clients should override this method in order to initialize their UI components.

The default implementation does nothing.

Overrides:
initClientUI in class BasicApp
Parameters:
pm - a progress monitor, can be used to signal progress

getApplicationPage

public VisatApplicationPage getApplicationPage()
Specified by:
getApplicationPage in interface AppContext

handleImminentExit

protected void handleImminentExit()
Resets the singleton application instance so that getApp() will return null after this method has been called.

Overrides:
handleImminentExit in class BasicApp
See Also:
BasicApp.savePreferences()

getApp

public static VisatApp getApp()
Returns the one and only VISAT application instance (singleton).

Returns:
the VISAT application. If it has not been started so far, null is returned.

getPreferencesDialog

public VisatPreferencesDialog getPreferencesDialog()
Returns:
VISAT's preferences dialog

getDesktopPane

public com.bc.swing.desktop.TabbedDesktopPane getDesktopPane()
Returns:
the scrollable desktop pane used by VISAT

getSessionFile

public File getSessionFile()
Returns:
The file of the current session.
Since:
BEAM 4.6

setSessionFile

public void setSessionFile(File sessionFile)
Sets the file of the current session.

Parameters:
sessionFile - The file of the current session.
Since:
BEAM 4.6

addInternalFrameListener

public void addInternalFrameListener(InternalFrameListener listener)
Adds an internal frame listener to VISAT. Internal frame listeners are notified each time an internal frame within VISAT's desktop pane is activated, deactivated,opened or closed.

Parameters:
listener - the listener to be added

removeInternalFrameListener

public void removeInternalFrameListener(InternalFrameListener listener)
Removes an internal frame listener from VISAT. Internal frame listeners are notified each time an internal frame within VISAT's desktop pane is activated, deactivated,opened or closed.

Parameters:
listener - the listener to be removed

addProductTreeListener

public void addProductTreeListener(ProductTreeListener listener)
Adds a product tree listener to VISAT. Product tree listeners are notified each time a product node is selected or double-clicked within VISAT's product tree browser. Product nodes comprise a product itself, its bands, tie-point grids or metadata elements.

Parameters:
listener - the listener to be added

removeProductTreeListener

public void removeProductTreeListener(ProductTreeListener listener)
Removes a product tree listener from VISAT. Product tree listeners are notified each time a product node is selected or double-clicked within VISAT's product tree browser. Product nodes comprise a product itself, its bands, tie-point grids or metadata elements.

Parameters:
listener - the listener to be removed

addPropertyMapChangeListener

public void addPropertyMapChangeListener(PropertyMapChangeListener listener)
Adds a property map change listener to VISAT. Property map change listeners are notified each time the VISAT prferences have been loaded or modified.

Parameters:
listener - the listener to be added

removePropertyMapChangeListener

public void removePropertyMapChangeListener(PropertyMapChangeListener listener)
Removes a property map change listener from VISAT. Property map change listeners are notified each time the VISAT prferences have been loaded or modified.

Parameters:
listener - the listener to be removed

addProduct

public void addProduct(Product product)
Adds the given product to VISAT's internal open product list.

Parameters:
product - the product to be added

removeProduct

public void removeProduct(Product product)
Removes the given product from VISAT's internal open product list.

Parameters:
product - the product to be removed

disposeProduct

public void disposeProduct(Product product)
Removes and disposes the given product and performs a garbage collection. After calling this method, the product object cannot be used anymore.

Parameters:
product - the product to be disposed
See Also:
Product.dispose()

getProductManager

public ProductManager getProductManager()
Returns the product manager which holds the list of currently open products.

Specified by:
getProductManager in interface AppContext

getProductTree

public ProductTree getProductTree()
Returns VISAT's product tree browser.


getSelectedProduct

public Product getSelectedProduct()
Returns the currently selected product.

Specified by:
getSelectedProduct in interface AppContext
Returns:
the selected product, which can be null

setSelectedProductNode

public void setSelectedProductNode(JInternalFrame frame)
Sets the selected product node to the node displyed in the given internal frame.

Parameters:
frame - the internal frame which assigns a product node

getProductNode

public static ProductNode getProductNode(JInternalFrame frame)
Returns the product node cuurrently displayed in the given internal frame.

Returns:
the displayed product nod or null if the product node cannot be identified.

getSelectedProductNode

public ProductNode getSelectedProductNode()
Returns the currently selected node within a product.

Returns:
the selected node, which can be null

setSelectedProductNode

public void setSelectedProductNode(ProductNode selectedNode)
Sets the currently selected node.

The method does nothing if the given selected node is already the selected one The method calls updateState() if the selected node changes.

Parameters:
selectedNode - the product node, can be null

getSelectedProductNodeView

public ProductNodeView getSelectedProductNodeView()
Returns the selected product node view.

Returns:
the selected product node view, or null if no product scene view is selected

getSelectedProductSceneView

public ProductSceneView getSelectedProductSceneView()
Returns the selected product scene view.

Specified by:
getSelectedProductSceneView in interface AppContext
Returns:
the selected product scene view, or null if no product scene view is selected

getSelectedProductMetadataView

public ProductMetadataView getSelectedProductMetadataView()
Returns the selected product metadata view.

Returns:
the selected product metadata view, or null if no product metadata view is selected

getAllInternalFrames

public JInternalFrame[] getAllInternalFrames()
Returns all open (internal) frames VISAT currently has.

Returns:
the internal frames, never null.

findInternalFrames

public JInternalFrame[] findInternalFrames(RasterDataNode raster,
                                           int numBands)
Finds the (internal) frames for the given raster data node.

The content panes of the returned frames are always instances of ProductSceneView.

Parameters:
raster - the raster for which to perform the lookup
numBands - the number of bands in the view, pass -1 for all view types, 1 for single band type and 3 for RGB views
Returns:
the internal frames, never null.

findInternalFrame

public JInternalFrame findInternalFrame(RasterDataNode raster)
Finds the any internal frame for the given raster data node.

The content pane of the returned frame is always an instance of ProductSceneView.

Parameters:
raster - the raster for which to perform the lookup
Returns:
the internal frame or null if no frame was found

findInternalFrames

public JInternalFrame[] findInternalFrames(RasterDataNode raster)
Finds the (internal) frames for the given raster data node.

The content pane of the returned frame is always an instance of ProductSceneView.

Parameters:
raster - the raster for which to perform the lookup
Returns:
the internal frames, never null.

findInternalFrame

public JInternalFrame findInternalFrame(MetadataElement metadataElement)
Finds the (internal) frame for the given meta data element.

The content pane of the returned frame is always an instance of ProductMetadataView.

Parameters:
metadataElement - the metadata element for which to perform the lookup
Returns:
the internal frame or null if no frame was found

findInternalFrame

public JInternalFrame findInternalFrame(ProductNode productNode)
Finds the (internal) frame for the given product node.

The content pane of the returned frame is always an instance of ProductMetadataView.

Parameters:
productNode - the product node for which to perform the lookup
Returns:
the internal frame or null if no frame was found

getOpenProduct

public Product getOpenProduct(File file)
Finds the product associated with the given file.

Parameters:
file - the file
Returns:
the product associated with the given file. or null if no such exists.

closeAllAssociatedFrames

public void closeAllAssociatedFrames(Product product)
Closes all (internal) frames associated with the given product.

Parameters:
product - The product to close the internal frames for.

unloadAllAssociatedBands

public void unloadAllAssociatedBands(Product product)
Unloads all bands of the given product.


hasRasterProductSceneView

public boolean hasRasterProductSceneView(RasterDataNode raster)
Returns true if the given raster data node is used in any product scene view.

Parameters:
raster -
Returns:
true if raster is used

updateAssociatedViews

public void updateAssociatedViews(RasterDataNode[] rasters,
                                  VisatApp.ViewUpdateMethod updateMethod)

updateImages

public void updateImages(RasterDataNode[] rasters)

updateImage

public void updateImage(ProductSceneView view)

shutDown

public void shutDown()
Description copied from class: BasicApp
Exits the application.

The base class implementation calls setShuttingDown(true), calls BasicApp.handleImminentExit() and disposes the main frame.

When this method is overridden, this base class's implementation should always be called last. However, the preferred way to change the shutdown behaviour is to override the BasicApp.handleImminentExit() method.

Overrides:
shutDown in class BasicApp

newProduct

public Product newProduct()

openProduct

public void openProduct(File file)

closeSelectedProduct

public void closeSelectedProduct()
Closes the currently selected product.


closeProduct

public void closeProduct(Product product)
Closes the given product.

Parameters:
product - the product to be closed

closeAllProducts

public void closeAllProducts()
Closes the all open products.


saveSelectedProductAs

public void saveSelectedProductAs()
Prompts the user to enter a new file name and saves the currently selected product under this new file name.


saveProductAs

public void saveProductAs(Product product)
Prompts the user to enter a new file name and saves the given product under this new file name.

Parameters:
product - the product to be saved

saveSelectedProduct

public void saveSelectedProduct()
Saves the currently selected product using its current file path. If it does not have a file name the method call is equivalent to a call to the saveSelectedProductAs() method.


saveProduct

public void saveProduct(Product product)
Saves the given product using its current file path. If it does not have a file name the method call is equivalent to a call to the saveSelectedProductAs() method.

Parameters:
product - the product to be saved

writeProduct

public boolean writeProduct(Product product,
                            File file,
                            String formatName)

openProductSceneView

public void openProductSceneView(RasterDataNode raster)
Creates a new product scene view and opens an internal frame for it.


openProductSceneViewRGB

public void openProductSceneViewRGB(Product product,
                                    String helpId)
Asks the user to select or define a RGB profile from which the product scene view will be created and opend as internal frame.


showAboutBox

public void showAboutBox()
Shows VISAT's about box.


createAboutBox

protected ModalDialog createAboutBox()

updateMainFrameTitle

public void updateMainFrameTitle()
Updates the main frame's document title.


getExecutorService

public ExecutorService getExecutorService()

applyPreferences

protected void applyPreferences()
Overrides:
applyPreferences in class BasicApp

historyPush

protected void historyPush(File file)
Overrides:
historyPush in class BasicApp

getSelectedInternalFrame

public JInternalFrame getSelectedInternalFrame()

showPreferencesDialog

public void showPreferencesDialog(String helpId)

updateComponentTreeUI

protected void updateComponentTreeUI()
Called after the look & feel has changed. The method simply calls SwingUtilities.updateComponentTreeUI(getMainFrame()) in order to reflect changes of the look-and-feel.

You might want to override this method in order to call SwingUtilities.updateComponentTreeUI() on other top-level containers beside the main frame.

Overrides:
updateComponentTreeUI in class BasicApp

clearStatusBarMessage

public void clearStatusBarMessage()
Description copied from class: BasicApp
Clears the status bar message. Simply calls setStatusBarMessage(" Ready.").

Overrides:
clearStatusBarMessage in class BasicApp

createMainPane

protected JComponent createMainPane()
Overrides the base class version in order to create and configure the VISAT's main pane.

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

createMainToolBar

protected com.jidesoft.action.CommandBar createMainToolBar()
Overrides the base class version in order to create a tool bar for VISAT.

Overrides:
createMainToolBar in class BasicApp
Returns:
the tool bar for this application.

createStatusBar

protected com.jidesoft.status.StatusBar createStatusBar()
Creates a standard status bar for this application.

Overrides:
createStatusBar in class BasicApp
Returns:
a standard status bar for this application.

createToolButton

public AbstractButton createToolButton(String commandID)
Creates a tool button for the tool-command with the given command ID.

A command with the given ID must already been registered using any of the createToolCommand methods of VisatApp, or directly using the createToolCommand method of VISAT's CommandManager. Otherwise an IllegalArgumentException will be thrown.

The new button is which is automatically added to VISAT's tool button group to ensure that a only single tool is selected.

Parameters:
commandID - the command ID
Returns:
a tool button which is automatically added to VISAT's tool button group.
See Also:
BasicApp.getCommandManager()

createMainMenuBar

protected com.jidesoft.action.CommandBar createMainMenuBar()
Overrides the base class version in order to creates the menu bar for VISAT.

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

insertCommandMenuItems

protected void insertCommandMenuItems()
Overrides:
insertCommandMenuItems in class BasicApp

createInternalFrame

@Deprecated
public JInternalFrame createInternalFrame(String title,
                                                     Icon icon,
                                                     JComponent content,
                                                     String helpId)
Deprecated. Since BEAM 4.10, use createInternalFrame(String, javax.swing.Icon, javax.swing.JComponent, String, boolean) instead

Creates an internal frame and adds it to VISAT's desktop.

Parameters:
title - a frame title
icon - a frame icon, can be null
content - the frame's content pane
helpId - the id for help system
Returns:
the newly created frame

createInternalFrame

public JInternalFrame createInternalFrame(String title,
                                          Icon icon,
                                          JComponent content,
                                          String helpId,
                                          boolean maximizeFrame)
Creates an internal frame and adds it to VISAT's desktop.

Parameters:
title - a frame title
icon - a frame icon, can be null
content - the frame's content pane
helpId - the id for help system
maximizeFrame - flag indicating whether the frame is to be maximized
Returns:
the newly created frame

setVisatExitConfirmed

public void setVisatExitConfirmed(boolean visatExitConfirmed)


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