public class TLcyDAFIFFormatAddOn extends ALcyFormatAddOn
This add-on provides DAFIF(T) support. Note that you can only use this add-on if you also have the DAFIF Industry Specific Component.
This add-on was added as a replacement for TLcyDAFIFAddOn
.
The main benefits of this add-on are that it can open un-processed DAFIF data as well as processed (.toc) data
and that it can open multiple DAFIF data sets at the same time.
DAFIF data can now also be painted using hardware acceleration in Lightspeed views, using TLcyLspDAFIFFormatAddOn
.
In order to use the Lightspeed add-on, the use of this add-on is required. Also note that this add-on uses the
same styling as the old add-on, so it can not use the SLD files used in the
Lightspeed DAFIF add-on.
This add-on can not be loaded together with the old DAFIF add-on
.
This add-on uses TLcdDAFIFModelDecoder
that produces
lazily decoded models. For layers that are invisible, the data loading does not get triggered. For layers that
are visible, the data loading is triggered.
The configuration file allows to specify which layers should initially be invisible, and thus for which types the
data loading is postponed until the user makes those layers visible (or the model is accessed by other means apart
from visualization). Please refer to TLcyDAFIFFormatAddOn.cfg
for an example.
Constructor and Description |
---|
TLcyDAFIFFormatAddOn()
Creates a new
TLcyDAFIFAddOn . |
Modifier and Type | Method and Description |
---|---|
protected ALcyFormat |
createBaseFormat()
Returns a new data format for this add-on.
|
protected ALcyFormat |
createFormatWrapper(ALcyFormat aBaseFormat)
Returns a new data format wrapper for this add-on.
|
void |
plugInto(ILcyLucyEnv aLucyEnv)
Creates and plugs in the add-on's format.
|
void |
unplugFrom(ILcyLucyEnv aLucyEnv)
Unplugs the add-on's format.
|
createFormatTool, getFormat
createPreferencesTool, getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
protected ALcyFormat createBaseFormat()
ALcyFormatAddOn
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 ALcyFormat createBaseFormat() {
return new ALcyFormatWrapper(super.createBaseFormat()){
@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;
}
}
}
}
}
createBaseFormat
in class ALcyFormatAddOn
public void unplugFrom(ILcyLucyEnv aLucyEnv)
ALcyFormatAddOn
unplugFrom
in class ALcyFormatAddOn
aLucyEnv
- the Lucy environmentALcyAddOn.plugInto(com.luciad.lucy.ILcyLucyEnv)
protected final ALcyFormat createFormatWrapper(ALcyFormat aBaseFormat)
ALcyFormatAddOn
Returns a new data format wrapper for this add-on. A format wrapper extends the base format with aspects such as asynchronous painting, mutable file behavior, 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 ALcyFormatAddOn
aBaseFormat
- the base format to wrapALcyFormatWrapper
public void plugInto(ILcyLucyEnv aLucyEnv)
ALcyFormatAddOn
Creates and plugs in the add-on's format.
plugInto
in class ALcyFormatAddOn
aLucyEnv
- the Lucy environment to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)