<!--
  ~ Copyright (C) 2011 Brockmann Consult GmbH (info@brockmann-consult.de)
  ~
  ~ This program is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU General Public License as published by the Free
  ~ Software Foundation; either version 3 of the License, or (at your option)
  ~ any later version.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  ~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along
  ~ with this program; if not, see http://www.gnu.org/licenses/
  -->

<module>
    <manifestVersion>1.0.0</manifestVersion>
    <symbolicName>snap-ui</symbolicName>
    <version>1.0.0</version>
    <name>SNAP User Interface Library</name>
    <activator>org.esa.beam.BeamUiActivator</activator>


    <description>This module provides user interface components used e.g. by VISAT.</description>

    <vendor>Brockmann Consult GmbH</vendor>
    <contactAddress>Max-Planck-Str. 2, 21502 Geesthacht (Germany)</contactAddress>
    <copyright>(C) 2014 by Brockmann Consult GmbH</copyright>
    <url>http://envisat.esa.int/beam</url>
    <licenseUrl>http://www.gnu.org/licenses/gpl.html</licenseUrl>


    <dependency>
        <module>snap-core</module>
    </dependency>
    <dependency>
        <module>snap-ceres-ui</module>
    </dependency>
    <dependency>
        <module>snap-binding</module>
    </dependency>

    <categories>System,Library</categories>

    <extensionPoint id="helpSets"/>

    <!--
       Extension point 'applicationDescriptors': Adds new application descriptors to the runtime.
    -->
    <extensionPoint id="applicationDescriptors">
        <applicationDescriptor type="org.esa.beam.framework.ui.application.ApplicationDescriptor"
                               class="@descriptorClass"
                               autoConfig="true">
            <descriptorClass type="java.lang.Class">
                org.esa.beam.framework.ui.application.support.DefaultApplicationDescriptor
            </descriptorClass>
            <applicationId type="java.lang.String"/>
            <!-- ID of the ceres application -->
            <displayName type="java.lang.String"/>
            <frameIcon field="iconPath" type="java.lang.String"/>
            <resourceBundle type="java.lang.String"/>
            <excludedActions type="java.lang.String[]">
                <!-- Here: IDs of actions you wish to exclude from your application -->
                <!-- e.g. <id>helpTopics</id> -->
            </excludedActions>
            <excludedActionGroups type="java.lang.String[]">
                <!-- Here: IDs of action groups you wish to exclude from your application -->
                <!-- e.g. <id>processing.thematicLand</id> -->
            </excludedActionGroups>
            <excludedToolViews type="java.lang.String[]">
                <!-- Here:  IDs of tool views you wish to exclude from your application -->
                <!-- e.g. <id>org.esa.beam.visat.toolviews.lm.LayersToolView</id> -->
            </excludedToolViews>
        </applicationDescriptor>
    </extensionPoint>

    <!--
       Extension point 'toolViews': Adds new tool views to an application.
       Extensions are instances of org.esa.beam.framework.ui.application.ToolView
       specified by the 'class' element.
    -->
    <extensionPoint id="toolViews">
        <toolView type="org.esa.beam.framework.ui.application.ToolViewDescriptor"
                  class="@descriptorClass"
                  autoConfig="true">
            <descriptorClass type="java.lang.Class">
                org.esa.beam.framework.ui.application.support.DefaultToolViewDescriptor
            </descriptorClass>
            <class field="toolViewClass" type="java.lang.Class"/>
            <title type="java.lang.String"/>
            <description type="java.lang.String"/>
            <accelerator type="javax.swing.KeyStroke"/>
            <icon field="iconPath" type="java.lang.String"/>
            <mnemonic type="char"/>
        </toolView>
    </extensionPoint>

    <!--
       Extension point 'actions': Adds new actions to an application.
       Extensions are instances of org.esa.beam.framework.ui.command.Command
       specified by the 'class' element.
    -->
    <extensionPoint id="actions">
        <action type="org.esa.beam.framework.ui.command.Command"
                class="@class"
                autoConfig="false">
            <id type="java.lang.String"/>
            <class type="java.lang.Class"/>
            <parent type="java.lang.String"/>
            <text type="java.lang.String"/>
            <context type="java.lang.String"/>
            <mnemonic type="char"/>
            <accelerator type="javax.swing.KeyStroke"/>
            <placeAtContextTop type="boolean"/>
            <placeFirst type="boolean"/>
            <placeLast type="boolean"/>
            <placeBefore type="java.lang.String"/>
            <placeAfter type="java.lang.String"/>
            <separatorBefore type="boolean"/>
            <separatorAfter type="boolean"/>
            <shortDescr type="java.lang.String"/>
            <description type="java.lang.String"/>
            <smallIcon type="java.lang.String"/>
            <largeIcon type="java.lang.String"/>
            <helpId type="java.lang.String"/>
        </action>

    </extensionPoint>

    <!--
       Extension point 'actionGroups': Adds new action groups to an application.
       The 'items' element is composed of 'separator', 'action' and 'actionGroup' elements.
       The values of the 'action' and 'actionGroup' elements are the referenced action's and actionGroup's
       'id' values.
    -->
    <extensionPoint id="actionGroups">
        <actionGroup type="org.esa.beam.framework.ui.command.CommandGroup"
                class="@descriptorClass"
                autoConfig="false">
            <descriptorClass type="java.lang.Class">org.esa.beam.framework.ui.command.CommandGroup</descriptorClass>
            <id type="java.lang.String"/>
            <class type="java.lang.Class"/>
            <parent type="java.lang.String"/>
            <text type="java.lang.String"/>
            <context type="java.lang.String"/>
            <mnemonic type="char"/>
            <accelerator type="javax.swing.KeyStroke"/>
            <placeAtContextTop type="boolean"/>
            <placeFirst type="boolean"/>
            <placeLast type="boolean"/>
            <placeBefore type="java.lang.String"/>
            <placeAfter type="java.lang.String"/>
            <separatorBefore type="boolean"/>
            <separatorAfter type="boolean"/>
            <shortDescr type="java.lang.String"/>
            <description type="java.lang.String"/>
            <smallIcon type="java.lang.String"/>
            <largeIcon type="java.lang.String"/>
            <helpId type="java.lang.String"/>
            <items type="java.lang.Object[]"/>
        </actionGroup>
    </extensionPoint>

    <!--
       The extension point 'layerEditors' comprises any number of 'layerEditor' elements.
       These are mappings from a specific layer or layer type to an appropriate layer editor or editor factory.
       The value of the 'editor' element is the name of a class that implements the org.esa.beam.framework.ui.layer.LayerEditor interface.
       The value of the 'editorFactory' element is the name of a class that implements the com.bc.ceres.core.ExtensionFactory interface.
    -->
    <extensionPoint id="layerEditors">
        <layerEditor type="org.esa.beam.framework.ui.layer.LayerEditorDescriptor"
                     class="@descriptorClass"
                     autoConfig="true">
            <descriptorClass type="java.lang.Class">org.esa.beam.framework.ui.layer.DefaultLayerEditorDescriptor
            </descriptorClass>

            <!--
                 Either 'editor' or 'editorFactory' must be given:
                 - 'editor' must be a 'org.esa.beam.framework.ui.layer.LayerEditor'
                 - 'editorFactory' must be a 'com.bc.ceres.core.ExtensionFactory' that produces
                    instances of 'org.esa.beam.framework.ui.layer.LayerEditor'.
             -->
            <editor field="layerEditorClass" type="java.lang.Class"/>
            <editorFactory field="layerEditorFactoryClass" type="java.lang.Class"/>

            <!--
                 At least 'layer' or 'layerType' must be given:
                 - 'layer' must be a 'com.bc.ceres.glayer.Layer'
                 - 'layerType' must be a 'com.bc.ceres.glayer.LayerType'.
             -->
            <layer field="layerClass" type="java.lang.Class"/>
            <layerType field="layerTypeClass" type="java.lang.Class"/>

        </layerEditor>
    </extensionPoint>

    <!--
       The extension point 'layerSources' comprises any number of 'layerSource' elements.
       The value of the 'layerSourceClass' element is the name of a class that implements the org.esa.beam.framework.ui.layer.LayerSource interface.
    -->
    <extensionPoint id="layerSources">
        <layerSource type="org.esa.beam.framework.ui.layer.LayerSourceDescriptor"
                     class="@descriptorClass"
                     autoConfig="true">
            <descriptorClass type="java.lang.Class">org.esa.beam.framework.ui.layer.DefaultLayerSourceDescriptor
            </descriptorClass>
            <id field="id" type="java.lang.String"/>
            <name field="name" type="java.lang.String"/>
            <description field="description" type="java.lang.String"/>
            <class field="layerSourceClass" type="java.lang.Class"/>
            <layerType field="layerTypeClassName" type="java.lang.String"/>
        </layerSource>
    </extensionPoint>


    <!--
        Experimental code added by Norman.
        Demonstrates how we create layers for special feature types, e.g. "org.esa.beam.TrackPoint".
        See class org.esa.beam.framework.ui.product.TrackLayerTypeFactory.
    -->
    <extension point="snap-ceres-core:adapters">
        <adapter>
            <extensibleType>org.esa.beam.framework.datamodel.VectorDataNode</extensibleType>
            <extensionFactory>org.esa.beam.framework.ui.product.TrackLayerTypeFactory</extensionFactory>
        </adapter>
    </extension>

</module>
