Class TLcyS101FormatAddOn


public class TLcyS101FormatAddOn extends ALcyFormatAddOn

This add-on provides support for the S-101 hydrographic format.

This add-on allows to decode S-101 data and create models for it. It also provides the corresponding S-101 visualization in a GXY view.

The visualization of the data is defined in the S-101 standard, which allows for a few customizations. These customization options are grouped in the TLcdS101DisplaySettings class. Lucy uses one instance of this class, meaning that all S-101 layers have the same S-101 style (both GXY as Lightspeed layers). This single, application-wide TLcdS101DisplaySettings instance is retrieved from the Lucy service. If no instance is found during the initialization of this add-on, a new TLcdS101DisplaySettings instance is created and added to the Lucy service.

To customize the S-101 display settings in the UI, an ILcyCustomizerPanelFactory is registered on the Lucy back-end. By default, a customizer panel is shown as soon as an S-101 layer is added to the view. Through the configuration file of this add-on, you can also make this panel available via a menu item. If you want to adjust the UI for the S-101 display settings, you should register your own ILcyCustomizerPanelFactory on the back-end capable of creating ILcyCustomizerPanel instances for a TLcdS101DisplaySettings object.

This add-on also adds workspace support, allowing S-101 layers and the currently active S-101 display settings to be encoded to and decoded from a Lucy workspace.

Since:
2026.0
  • Constructor Details

    • TLcyS101FormatAddOn

      public TLcyS101FormatAddOn()
      Creates a new TLcyS101FormatAddOn instance.
  • Method Details

    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyFormatAddOn

      Creates and plugs in the add-on's format.

      Overrides:
      plugInto in class ALcyFormatAddOn
      Parameters:
      aLucyEnv - the Lucy environment to plug into
      See Also:
    • unplugFrom

      public void unplugFrom(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyFormatAddOn
      Unplugs the add-on's format.
      Overrides:
      unplugFrom in class ALcyFormatAddOn
      Parameters:
      aLucyEnv - the Lucy environment
      See Also:
    • createBaseFormat

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

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

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