Class TLcyAPP6AAddOn

java.lang.Object
com.luciad.lucy.addons.ALcyAddOn
com.luciad.lucy.addons.ALcyPreferencesAddOn
com.luciad.lucy.addons.ALcyFormatAddOn
com.luciad.internal.lucy.addons.app6a.ALinAPP6AAddOn
com.luciad.lucy.addons.app6a.TLcyAPP6AAddOn

public class TLcyAPP6AAddOn extends com.luciad.internal.lucy.addons.app6a.ALinAPP6AAddOn

This add-on allows to visualize and edit APP6 data on a GXY map. Visualization and editing on a Lightspeed map is taken care of by the TLcyLspAPP6AAddOn.

As an ALcyFormatBarFactory is used for the UI to create new domain objects, this add-on requires the TLcyFormatBarAddOn (or equivalent) to show its tool bar for drawing new symbols. Without such add-on, that UI will never become visible to the end-user.

UI customization options

Besides the traditional customization options of an ALcyFormatAddOn, this add-on offers some extra customization options by exposing certain parts of the UI as sample code.

Adjusting the format bar

The format bar, which contains the UI elements to create new domain objects, is available as sample code. See the GXYAPP6FormatBarFactory sample class. If you want to make modifications to our format bar, you can start from the source code of this class.

Plugging in the custom format bar factory is done by returning it from ALcyFormat.createFormatBarFactory():


   @Override
   protected ALcyFormat createBaseFormat(){
     return new ALcyFormatWrapper(super.createBaseFormat()){
       @Override
       protected ALcyFormatBarFactory createFormatBarFactory(){
         return new CustomGXYAPP6FormatBarFactory();
       }
     }
   }
 

Note: The ALcyFormatBarFactory created here is only used to create the format bar for GXY maps. The one for Lightspeed maps is created in the TLcyLspAPP6AAddOn.

Adjusting the object properties panel

The object properties panel, which contains the UI to modify an existing domain object, is available as sample code. See the EditableAPP6ObjectCustomizerPanel and EditableAPP6ObjectCustomizerPanelFactory sample classes. If you want to make modifications to our object properties panel, you can start from the source code of those classes.

Plugging in the custom customizer panel factory for the domain object customizer panels is done by returning it from ALcyFormat.createDomainObjectCustomizerPanelFactories():


   @Override
   protected ALcyFormat createBaseFormat(){
     return new ALcyFormatWrapper(super.createBaseFormat()){
       @Override
       protected ILcyCustomizerPanelFactory[] createDomainObjectCustomizerPanelFactories() {
         return new ILcyCustomizerPanelFactory[]{
           new CustomEditableAPP6ObjectCustomizerPanelFactory()
         }
       }
     }
   }
 
  • Constructor Details

    • TLcyAPP6AAddOn

      public TLcyAPP6AAddOn()
      Constructs a new TLcyAPP6AAddOn instance.
  • Method Details

    • 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).

      Overrides:
      createFormatWrapper in class com.luciad.internal.lucy.addons.app6a.ALinAPP6AAddOn
      Parameters:
      aBaseFormat - the base format to wrap
      Returns:
      a new format for this add-on
      See Also: