public class TLcyDefaultDecodersAddOn extends ALcyPreferencesAddOn
This add-on is a collection of default LuciadLightspeed formats. For each format, an appropriate model decoder is registered to ILcyLucyEnv, an encoder (if it exists for that format), a layer factory, a customizer for the layer properties, a layer type provider and a model content type provider. For the SHP and raster formats, also layer encoders and decoders are registered. This allows to save the layer style for those formats.
For the SHP format and the raster formats (DTED, GeoTiff, TFW, DEM, ...), the layer style can be saved and restored using the layer encoders/decoders registered with the ILcyLucyEnv.
This add-on also adds support for the mtm format (see com.luciad.model.TLcdMultilevelTiledModelDecoder). The support is however limited for mtm files composed of SHP files.
Constructor and Description |
---|
TLcyDefaultDecodersAddOn()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected ALcyFormat |
createSHPFormat()
Creates the
ALcyFormat for SHP data. |
ALcyFormat |
getSHPFormat()
Returns the
ALcyFormat class that encapsulates this add-on's SHP data format. |
void |
plugInto(ILcyLucyEnv aLucyEnv)
Creates and plugs in the add-on's preferences tool.
|
void |
unplugFrom(ILcyLucyEnv aLucyEnv)
Unplugs the add-on's preferences tool.
|
createPreferencesTool, getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
public void plugInto(ILcyLucyEnv aLucyEnv)
ALcyPreferencesAddOn
plugInto
in class ALcyPreferencesAddOn
aLucyEnv
- the Lucy environment to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
protected ALcyFormat createSHPFormat()
Creates the ALcyFormat
for SHP data.
Override this method to extend the default format with the new functionality.
This method will only be called when the configuration file of this add-on indicates that the SHP format must be plugged in.
For example, to alter the icon of the layers of this format, you can decorate the layer factory created in the format:
@Override
protected ALcyFormat createSHPFormat() {
return new ALcyFormatWrapper(super.createSHPFormat()){
@Override
protected ILcdGXYLayerFactory createGXYLayerFactory(){
final ILcdGXYLayerFactory delegate = super.createGXYLayerFactory();
return new ILcdGXYLayerFactory(){
@Override
public ILcdGXYLayer createGXYLayer(ILcdModel aModel){
ILcdGXYLayer layer = delegate.createGXYLayer(aModel);
if (layer != null){
ILcdIcon icon = ...;
layer.setIcon(icon);
}
return layer;
}
}
}
}
}
ALcyFormat
for SHP data.public final ALcyFormat getSHPFormat()
Returns the ALcyFormat
class that encapsulates this add-on's SHP data format. See the
createSHPFormat()
method if you want to override or extend the data format. Note that
the format instance returned here might be different from the one created by createSHPFormat()
as it might be wrapped with some ALcyFormatWrapper
instances..
public void unplugFrom(ILcyLucyEnv aLucyEnv)
ALcyPreferencesAddOn
unplugFrom
in class ALcyPreferencesAddOn
aLucyEnv
- the Lucy environmentALcyAddOn.plugInto(com.luciad.lucy.ILcyLucyEnv)