Developing Applications based on VISAT

Skip to end of metadata
Go to start of metadata
Important Note
This article refers to BEAM 4.2, which is currently under development. Please refer to the page Build from Source in order to obtain the latest source code and build BEAM.

This article explains briefly how to create an application based on BEAM VISAT. In the following example, the VISAT clone is named "DAT":

  1. Create the Application Module
  2. Provide some Java Code
  3. Provide a Module Descriptor
  4. Provide a Launcher Configuration File
  5. Launch the Application

Create the Application Module

Create a new BEAM module as described in Extending BEAM or in Exercise 5 - BEAM Modules of the programming tutorial. The typical BEAM directory structure is explained in the module runtime framework Ceres, which is uased by BEAM.

Provide some Java Code

Provide a factory method for your application instance in the entry point class derived from VisatMain:

public class DatMain extends VisatMain {
    @Override
    protected VisatApp createApplication(ApplicationDescriptor applicationDescriptor) {
        return new DatApp(applicationDescriptor);
    }
}

Derive your application instance from VisatApp:

public final class DatApp extends VisatApp {
    public DatApp(ApplicationDescriptor applicationDescriptor) {
        super(applicationDescriptor);
    }

    public static DatApp getApp() {
        return (DatApp) VisatApp.getApp();
    }
    
    // You can now override numerous createXXX() methods 
    // to customize the application GUI
}

Provide a Module Descriptor

In your module.xml provide extension for the extension points ceres-core:applications and
beam-ui:applicationDescriptors as follows:

<module>
    <manifestVersion>1.0.0</manifestVersion>
    <symbolicName>nest-dat</symbolicName>
    <version>0.1</version>
    <name>NEST DAT Application</name>
    <dependency>
        <module>beam-visat-rcp</module>
    </dependency>
    <categories>Application,DAT</categories>
    <copyright>(c) 2007 by Array Inc.</copyright>
    <extension point="ceres-core:applications">
        <application id="DatMain" class="org.esa.nest.dat.DatMain"/>
    </extension>
    <extension point="beam-ui:applicationDescriptors">
        <applicationDescriptor>
            <applicationId>DatMain</applicationId>
            <displayName>DAT</displayName>
            <frameIcon>/org/esa/nest/dat/images/frame-icon.png</frameIcon>
            <image>/org/esa/nest/dat/images/about.jpg</image>
            <excludedActions/>
            <excludedToolViews>
                <id>org.esa.beam.visat.toolviews.lm.LayersToolView</id>
                <id>org.esa.beam.visat.toolviews.bitmask.BitmaskOverlayToolView</id>
                <id>org.esa.beam.visat.toolviews.imageinfo.ColorManipulationToolView</id>
                <id>org.esa.beam.visat.toolviews.pin.PinManagerToolView</id>
                <id>org.esa.beam.visat.toolviews.pin.GcpManagerToolView</id>
                <id>org.esa.beam.visat.toolviews.spectrum.SpectrumToolView</id>
            </excludedToolViews>
        </applicationDescriptor>
    </extension>
    <extension point="beam-ui:toolViews">
        <!-- Add your special toolView descriptors here. For examples see the  -->
        <!-- module.xml of module beam-visat-rcp. -->
    </extension>
    <extension point="beam-ui:actions">
        <!-- Add your special action descriptors here. For examples see the  -->
        <!-- module.xml of module beam-visat-rcp. -->
    </extension>
</module>

The beam-ui:applicationDescriptors extenion is used to brand the application.
Note that the references to the two images frame-icon.png and about.jpg need to be defined in the classpath of your module.

Provide a Launcher Configuration File

Place a configuration file, e.g. config/nest.config in the BEAM installation directory and provide a splash screen image for your application:

nest.home = .
nest.app = DatMain
nest.consoleLog = true
nest.logLevel = ALL
nest.repository.url = http://www.brockmann-consult.de/beam/software/repositories/4.2-SNAPSHOT/
nest.debug = true
nest.datasources.url = http://www.brockmann-consult.de/beam-wiki/display/BEAM/Data+Sources
nest.splash.image = ${nest.home}/src/main/bin/common/splash.png
nest.splash.progressBar.area = 104,101,376,5
nest.splash.progressBar.color = 255,153,51,150

Launch the Application

Main class: com.bc.ceres.launcher.Launcher
VM-parameters: -Xmx1024M -Dceres.context=nest
Working directory: ${BEAM_HOME}

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.