|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.ui.BasicApp
org.esa.beam.visat.VisatApp
public class VisatApp
The VisatApp class represents the VISAT application.
| 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
|
| 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 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 |
|---|
@Deprecated public static final String APP_DEFAULT_PLUGIN_DIR
public static final String PROPERTY_KEY_SAVE_PRODUCT_HEADERS
public static final String PROPERTY_KEY_SAVE_PRODUCT_HISTORY
public static final String PROPERTY_KEY_SAVE_PRODUCT_ANNOTATIONS
public static final String PROPERTY_KEY_GEOLOCATION_EPS
public static final double PROPERTY_DEFAULT_GEOLOCATION_EPS
public static final String PROPERTY_KEY_SAVE_INCREMENTAL
public static final String PROPERTY_KEY_LOW_MEMORY_LIMIT
public static final String PROPERTY_KEY_JAI_TILE_CACHE_CAPACITY
public static final String PROPERTY_KEY_AUTO_SHOW_NEW_BANDS
public static final String PROPERTY_KEY_AUTO_SHOW_MAGNIFIER
public static final String PROPERTY_KEY_AUTO_SHOW_NAVIGATION
public static final String PROPERTY_KEY_VERSION_CHECK_ENABLED
public static final String PROPERTY_KEY_VERSION_CHECK_DONT_ASK
public static final String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_X
public static final String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_Y
public static final float PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY
public static final String PROPERTY_KEY_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS
public static final boolean PROPERTY_DEFAULT_PIXEL_OFFSET_FOR_DISPLAY_SHOW_DECIMALS
public static final String PROPERTY_KEY_DISPLAY_GEOLOCATION_AS_DECIMAL
public static final boolean PROPERTY_DEFAULT_DISPLAY_GEOLOCATION_AS_DECIMAL
public static final boolean DEFAULT_VALUE_SAVE_PRODUCT_ANNOTATIONS
public static final boolean DEFAULT_VALUE_SAVE_INCREMENTAL
public static final boolean DEFAULT_VALUE_SAVE_PRODUCT_HEADERS
public static final boolean DEFAULT_VALUE_SAVE_PRODUCT_HISTORY
public static final String ALL_FILES_IDENTIFIER
public static final String MAIN_TOOL_BAR_ID
public static final String VIEWS_TOOL_BAR_ID
public static final String INTERACTIONS_TOOL_BAR_ID
public static final String ANALYSIS_TOOL_BAR_ID
public static final String LAYERS_TOOL_BAR_ID
| Constructor Detail |
|---|
public VisatApp(ApplicationDescriptor applicationDescriptor)
applicationDescriptor - The application descriptor.| Method Detail |
|---|
protected void initClient(com.bc.ceres.core.ProgressMonitor pm)
BasicAppBasicApp.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.
initClient in class BasicApppm - a progress monitor, can be used to signal progresspublic com.bc.ceres.swing.figure.Interactor getActiveInteractor()
public void setActiveInteractor(com.bc.ceres.swing.figure.Interactor interactor)
public String getApplicationName()
getApplicationName in interface AppContextpublic Window getApplicationWindow()
getApplicationWindow in interface AppContext
public void handleError(String message,
Throwable t)
handleError in interface AppContextprotected void initClientUI(com.bc.ceres.core.ProgressMonitor pm)
BasicAppBasicApp.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.
initClientUI in class BasicApppm - a progress monitor, can be used to signal progresspublic VisatApplicationPage getApplicationPage()
getApplicationPage in interface AppContextprotected void handleImminentExit()
getApp() will return null after this method has been called.
handleImminentExit in class BasicAppBasicApp.savePreferences()public static VisatApp getApp()
null is returned.public VisatPreferencesDialog getPreferencesDialog()
public com.bc.swing.desktop.TabbedDesktopPane getDesktopPane()
public File getSessionFile()
public void setSessionFile(File sessionFile)
sessionFile - The file of the current session.public void addInternalFrameListener(InternalFrameListener listener)
listener - the listener to be addedpublic void removeInternalFrameListener(InternalFrameListener listener)
listener - the listener to be removedpublic void addProductTreeListener(ProductTreeListener listener)
listener - the listener to be addedpublic void removeProductTreeListener(ProductTreeListener listener)
listener - the listener to be removedpublic void addPropertyMapChangeListener(PropertyMapChangeListener listener)
listener - the listener to be addedpublic void removePropertyMapChangeListener(PropertyMapChangeListener listener)
listener - the listener to be removedpublic void addProduct(Product product)
product - the product to be addedpublic void removeProduct(Product product)
product - the product to be removedpublic void disposeProduct(Product product)
product - the product to be disposedProduct.dispose()public ProductManager getProductManager()
getProductManager in interface AppContextpublic ProductTree getProductTree()
public Product getSelectedProduct()
getSelectedProduct in interface AppContextnullpublic void setSelectedProductNode(JInternalFrame frame)
frame - the internal frame which assigns a product nodepublic static ProductNode getProductNode(JInternalFrame frame)
null if the product node cannot be identified.public ProductNode getSelectedProductNode()
nullpublic void setSelectedProductNode(ProductNode selectedNode)
The method does nothing if the given selected node is already the selected one The method calls
updateState() if the selected node changes.
selectedNode - the product node, can be nullpublic ProductNodeView getSelectedProductNodeView()
null if no product scene view is selectedpublic ProductSceneView getSelectedProductSceneView()
getSelectedProductSceneView in interface AppContextnull if no product scene view is selectedpublic ProductMetadataView getSelectedProductMetadataView()
null if no product metadata view is selectedpublic JInternalFrame[] getAllInternalFrames()
null.
public JInternalFrame[] findInternalFrames(RasterDataNode raster,
int numBands)
The content panes of the returned frames are always instances of ProductSceneView.
raster - the raster for which to perform the lookupnumBands - the number of bands in the view, pass -1 for all view types, 1 for single band type and 3 for RGB
views
null.public JInternalFrame findInternalFrame(RasterDataNode raster)
The content pane of the returned frame is always an instance of ProductSceneView.
raster - the raster for which to perform the lookup
null if no frame was foundpublic JInternalFrame[] findInternalFrames(RasterDataNode raster)
The content pane of the returned frame is always an instance of ProductSceneView.
raster - the raster for which to perform the lookup
null.public JInternalFrame findInternalFrame(MetadataElement metadataElement)
The content pane of the returned frame is always an instance of ProductMetadataView.
metadataElement - the metadata element for which to perform the lookup
null if no frame was foundpublic JInternalFrame findInternalFrame(ProductNode productNode)
The content pane of the returned frame is always an instance of ProductMetadataView.
productNode - the product node for which to perform the lookup
null if no frame was foundpublic Product getOpenProduct(File file)
file - the file
null if no such exists.public void closeAllAssociatedFrames(Product product)
product - The product to close the internal frames for.public void unloadAllAssociatedBands(Product product)
public boolean hasRasterProductSceneView(RasterDataNode raster)
raster -
public void updateAssociatedViews(RasterDataNode[] rasters,
VisatApp.ViewUpdateMethod updateMethod)
public void updateImages(RasterDataNode[] rasters)
public void updateImage(ProductSceneView view)
public void shutDown()
BasicAppThe 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.
shutDown in class BasicApppublic Product newProduct()
public void openProduct(File file)
public void closeSelectedProduct()
public void closeProduct(Product product)
product - the product to be closedpublic void closeAllProducts()
public void saveSelectedProductAs()
public void saveProductAs(Product product)
product - the product to be savedpublic void saveSelectedProduct()
saveSelectedProductAs() method.
public void saveProduct(Product product)
saveSelectedProductAs() method.
product - the product to be saved
public boolean writeProduct(Product product,
File file,
String formatName)
public void openProductSceneView(RasterDataNode raster)
public void openProductSceneViewRGB(Product product,
String helpId)
public void showAboutBox()
protected ModalDialog createAboutBox()
public void updateMainFrameTitle()
public ExecutorService getExecutorService()
protected void applyPreferences()
applyPreferences in class BasicAppprotected void historyPush(File file)
historyPush in class BasicApppublic JInternalFrame getSelectedInternalFrame()
public void showPreferencesDialog(String helpId)
protected void updateComponentTreeUI()
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.
updateComponentTreeUI in class BasicApppublic void clearStatusBarMessage()
BasicAppsetStatusBarMessage(" Ready.").
clearStatusBarMessage in class BasicAppprotected JComponent createMainPane()
createMainPane in class BasicAppprotected com.jidesoft.action.CommandBar createMainToolBar()
createMainToolBar in class BasicAppprotected com.jidesoft.status.StatusBar createStatusBar()
createStatusBar in class BasicApppublic AbstractButton createToolButton(String commandID)
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.
commandID - the command ID
BasicApp.getCommandManager()protected com.jidesoft.action.CommandBar createMainMenuBar()
createMainMenuBar in class BasicAppprotected void insertCommandMenuItems()
insertCommandMenuItems in class BasicApp
@Deprecated
public JInternalFrame createInternalFrame(String title,
Icon icon,
JComponent content,
String helpId)
createInternalFrame(String, javax.swing.Icon, javax.swing.JComponent, String, boolean) instead
title - a frame titleicon - a frame icon, can be nullcontent - the frame's content panehelpId - the id for help system
public JInternalFrame createInternalFrame(String title,
Icon icon,
JComponent content,
String helpId,
boolean maximizeFrame)
title - a frame titleicon - a frame icon, can be nullcontent - the frame's content panehelpId - the id for help systemmaximizeFrame - flag indicating whether the frame is to be maximized
public void setVisatExitConfirmed(boolean visatExitConfirmed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||