Package org.esa.snap.ui.layer
Class DefaultLayerSourceDescriptor
- java.lang.Object
-
- org.esa.snap.ui.layer.DefaultLayerSourceDescriptor
-
- All Implemented Interfaces:
LayerSourceDescriptor
public class DefaultLayerSourceDescriptor extends Object implements LayerSourceDescriptor
TheDefaultLayerSourceDescriptor
provides metadata and a factory method for aLayerSource
.Instances of this class are created by reading the extension configuration of the extension point
Example 1:"layerSources"
in themodule.xml
.<extension point="beam-visat-rcp:layerSources"> <layerSource> <id>shapefile-layer-source</id> <name>ESRI Shapefile</name> <description>Displays shapes from an ESRI Shapefile</description> <class>org.esa.snap.visat.toolviews.layermanager.layersrc.shapefile.ShapefileLayerSource</class> </layerSource> </extension>
Example 2:<extension point="beam-visat-rcp:layerSources"> <layerSource> <id>bluemarble-layer-source</id> <name>NASA Blue Marble;/name> <description>Adds NASA Blue Marble image layer to the background.</description> <layerType>org.esa.snap.worldmap.BlueMarbleLayerType</class> </layerSource> </extension>
Note: This API is not public yet and may significantly change in the future. Use it at your own risk.
-
-
Constructor Summary
Constructors Constructor Description DefaultLayerSourceDescriptor(String id, String name, String description, Class<? extends LayerSource> layerSourceClass)
DefaultLayerSourceDescriptor(String id, String name, String description, String layerTypeClassName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LayerSource
createLayerSource()
Creates theLayerSource
which is used in the graphical user interface to addLayer
to a view.String
getDescription()
A text describing what theLayerSource
, created by thisLayerSourceDescriptor
, does.String
getId()
A unique ID.LayerType
getLayerType()
TheLayerType
.String
getName()
A human readable name.String
toString()
-
-
-
Constructor Detail
-
DefaultLayerSourceDescriptor
public DefaultLayerSourceDescriptor(String id, String name, String description, Class<? extends LayerSource> layerSourceClass)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:LayerSourceDescriptor
A unique ID.- Specified by:
getId
in interfaceLayerSourceDescriptor
- Returns:
- The unique ID.
-
getName
public String getName()
Description copied from interface:LayerSourceDescriptor
A human readable name.- Specified by:
getName
in interfaceLayerSourceDescriptor
- Returns:
- The name.
-
getDescription
public String getDescription()
Description copied from interface:LayerSourceDescriptor
A text describing what theLayerSource
, created by thisLayerSourceDescriptor
, does.- Specified by:
getDescription
in interfaceLayerSourceDescriptor
- Returns:
- A description.
-
createLayerSource
public LayerSource createLayerSource()
Description copied from interface:LayerSourceDescriptor
Creates theLayerSource
which is used in the graphical user interface to addLayer
to a view.- Specified by:
createLayerSource
in interfaceLayerSourceDescriptor
- Returns:
- The
LayerSource
.
-
getLayerType
public LayerType getLayerType()
Description copied from interface:LayerSourceDescriptor
TheLayerType
.- Specified by:
getLayerType
in interfaceLayerSourceDescriptor
- Returns:
- the type of the layer which is added to a view, or
null
if multiple layers are added.
-
-