public class TLcyLspS57FormatAddOn extends ALcyLspFormatAddOn
This add-on provides Lightspeed visualization support for S-57 models.
The visualization of the S-57 data is defined in the S-52 standard. This standard allows for
a few customizations. Theses customization options are grouped in a TLcdS52DisplaySettings
object (see the S-57 developer guide for more information). Lucy uses two instances of this
TLcdS52DisplaySettings
class: one for ENC/IENC product types and one for AML.
This means that all S-57 layers of the same product type have the same S-52 style (both GXY as Lightspeed layers).
The TLcdS52DisplaySettings
instances are registered as services
on the Lucy back-end by the TLcyS57DecoderAddOn
, and re-used by this add-on.
Constructor and Description |
---|
TLcyLspS57FormatAddOn()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected ALcyLspFormat |
createBaseFormat()
Returns a new data format for this add-on.
|
protected ALcyLspFormat |
createFormatWrapper(ALcyLspFormat aBaseFormat)
Returns a new data format wrapper for this add-on.
|
void |
plugInto(ILcyLucyEnv aLucyEnv)
Creates and plugs in the add-on's format and preferences tool.
|
createFormatTool, getFormat, unplugFrom
createPreferencesTool, getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
public void plugInto(ILcyLucyEnv aLucyEnv)
ALcyLspFormatAddOn
plugInto
in class ALcyLspFormatAddOn
aLucyEnv
- the Lucy environment to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
protected ALcyLspFormat createBaseFormat()
ALcyLspFormatAddOn
Returns a new data format for this add-on. Override this method to extend the default format with new functionality.
For example, to alter the icon of the layers of this format, you can decorate the layer factory created in the format:
@Override
protected ALcyLspFormat createBaseFormat() {
return new ALcyLspFormatWrapper(super.createBaseFormat()){
@Override
protected ILspLayerFactory createLayerFactory(){
final ILspLayerFactory delegate = super.createLayerFactory();
return new ILspLayerFactory(){
@Override
public boolean canCreateLayers(ILcdModel aModel){
return delegate.canCreateLayers(aModel);
}
@Override
public Collection<ILspLayer> createLayers(ILcdModel aModel){
Collection<ILspLayer> layers = delegate.createLayers(aModel);
for(ILspLayer layer : layers){
ILcdIcon icon = ...;
layer.setIcon(icon)
}
return layers;
}
}
}
}
}
createBaseFormat
in class ALcyLspFormatAddOn
protected final ALcyLspFormat createFormatWrapper(ALcyLspFormat aBaseFormat)
ALcyLspFormatAddOn
Returns a new data format wrapper for this add-on. A format wrapper extends the base format with aspects such as safe guarding, etc.
Overriding this method of an existing add-on should be done with extreme care as add-ons typically rely on the wrappers that should be present (e.g. a safe guard).
createFormatWrapper
in class ALcyLspFormatAddOn
aBaseFormat
- the base format to wrapALcyLspFormatWrapper