Class TLcySelectionEditorAddOn

java.lang.Object
com.luciad.lucy.addons.ALcyAddOn
com.luciad.lucy.addons.selectioneditor.TLcySelectionEditorAddOn

public class TLcySelectionEditorAddOn extends ALcyAddOn

This add-on allows the editing of a selected object. It can be activated by clicking the "Map | Object Properties" menu-item, by double-clicking a selectable domain object on the map or right-clicking on a selectable domain object and choosing the "Properties" menu-item.

This add-on provides an ILcyApplicationPane (the UI panel), the logic to track the selection etc. The actual content that is shown when an object is selected is an ILcyCustomizerPanel, created by its respective factory. Those factories are not provided by this add-on. They can be provided by the various data format add-ons, and if they don't, the TLcyTreeTableViewAddOn provides a generic UI that can deal with almost all objects that implement ILcdDataObject (or ILcdFeatured). The content then typically shows the properties of the selected domain objects, and may also allow to modify them.

It tries to create such an ILcyCustomizerPanel by iterating over all registered ILcyCustomizerPanelFactory objects with a TLcyDomainObjectContext that contains the domain object and the model, layer and view in which it is contained. In case of multiple selection, an array of TLcyDomainObjectContext instances is used. This add-on caches the ILcyCustomizerPanel instances created this way so they can be reused when the selection changes. This cache uses SoftReference to prevent memory issues.

The menu-items and the location of the ILcyApplicationPane can be configured in the configuration file of this add-on.

Note: The deprecated ILcyObjectCustomizerFactory instances are still supported. These are treated as if they were in the list of registered ILcyCustomizerPanelFactory instances with a priority of 15000, halfway between TLcyCompositeCustomizerPanelFactory.PRIORITY_NORMAL and TLcyCompositeCustomizerPanelFactory.PRIORITY_FALLBACK. This means that the map editor will first try to create customizer panels from ILcyCustomizerPanelFactory instances that are registered with a higher priority than this priority, will then try the deprecated ILcyObjectCustomizerFactory instances and only then will it try to create customizer panels from ILcyCustomizerPanelFactory instances registered with a lower priority.

See Also:
  • Field Details

    • SELECTION_EDITOR_GROUP_DESCRIPTOR

      public static final TLcyGroupDescriptor SELECTION_EDITOR_GROUP_DESCRIPTOR
  • Constructor Details

    • TLcySelectionEditorAddOn

      public TLcySelectionEditorAddOn()
  • Method Details

    • setClassTraceOn

      @Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      @Deprecated public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • isTraceOn

      @Deprecated public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • plugInto

      public void plugInto(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyAddOn
      Plugs this addon into the given lucy environment. It is in the implementation of this method that the addon adds its functionality to the Lucy backend.
      Specified by:
      plugInto in class ALcyAddOn
      Parameters:
      aLucyEnv - The lucy environment to plug into.
      See Also:
    • unplugFrom

      public void unplugFrom(ILcyLucyEnv aLucyEnv)
      Description copied from class: ALcyAddOn
      Unplugs this addon from the given Lucy environment. It removes the functionality previously added to the Lucy backend.
      Specified by:
      unplugFrom in class ALcyAddOn
      Parameters:
      aLucyEnv - The lucy environment to unplug from.
      See Also:
    • setActiveOnMapComponent

      public void setActiveOnMapComponent(boolean aActive, ILcyGenericMapComponent<? extends ILcdView,? extends ILcdLayer> aMapComponent)
      Activates or deactivates the selection editor add-on for the given map component. If the add-on is active for a particular map component, an application pane will be visible where the currently selected object can be modified. If the add-on is not active for a given map component, no such application pane will be there.
      Parameters:
      aActive - True if this add-on must be activated for the given map component, false if it must be deactivated.
      aMapComponent - The map component to (de)activate this add-on for.