Class TLcyLspDAFIFFormatAddOn


public class TLcyLspDAFIFFormatAddOn extends ALcyLspFormatAddOn
This add-on provides support for displaying DAFIF data in a Lightspeed view with ICAO styling.

It creates layers using TLspDAFIFLayerBuilder, which uses .sld files to define styling.

Customize styling using your own .sld files.
You can override the default .sld files using a configuration property in TLcyLspDAFIFFormatAddOn.cfg:

     TLcyLspDAFIFFormatAddOn.sldLocation=com/path/to/sldfiles
   
See TLspAISStyler or the DAFIF Developer's Guide for more details on how this works.

Customize by creating your own format.
You can override createBaseFormat() to do this, and decorate the parent format.

This add-on uses the property initiallyNotLoadedDataTypes in TLcyDAFIFFormatAddOn.cfg from TLcyDAFIFFormatAddOn to decide which layers are visible by default. See TLcyDAFIFFormatAddOn for more details.

Note that this add-on can not be loaded together with the old DAFIF add-on and it requires the new DAFIF add-on.

Since:
2014.0
  • Constructor Details

    • TLcyLspDAFIFFormatAddOn

      public TLcyLspDAFIFFormatAddOn()
      Default constructor
  • Method Details

    • createBaseFormat

      protected ALcyLspFormat createBaseFormat()
      Description copied from class: 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;
               }
             }
           }
         }
       }
       
      Specified by:
      createBaseFormat in class ALcyLspFormatAddOn
      Returns:
      a new format for this add-on
    • createFormatWrapper

      protected final ALcyLspFormat createFormatWrapper(ALcyLspFormat aBaseFormat)
      Description copied from class: 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).

      Specified by:
      createFormatWrapper in class ALcyLspFormatAddOn
      Parameters:
      aBaseFormat - the base format to wrap
      Returns:
      a new format for this add-on
      See Also:
    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyLspFormatAddOn
      Creates and plugs in the add-on's format and preferences tool.
      Overrides:
      plugInto in class ALcyLspFormatAddOn
      Parameters:
      aLucyEnv - the Lucy environment to plug into
      See Also: