Class TLcySelectionEditorAddOn
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.This method has been deprecated.void
plugInto
(ILcyLucyEnv aLucyEnv) Plugs this addon into the given lucy environment.void
setActiveOnMapComponent
(boolean aActive, ILcyGenericMapComponent<? extends ILcdView, ? extends ILcdLayer> aMapComponent) Activates or deactivates the selection editor add-on for the given map component.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
unplugFrom
(ILcyLucyEnv aLucyEnv) Unplugs this addon from the given Lucy environment.Methods inherited from class com.luciad.lucy.addons.ALcyAddOn
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
-
Field Details
-
SELECTION_EDITOR_GROUP_DESCRIPTOR
-
-
Constructor Details
-
TLcySelectionEditorAddOn
public TLcySelectionEditorAddOn()
-
-
Method Details
-
setClassTraceOn
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 istrue
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.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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
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.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
plugInto
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. -
unplugFrom
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 classALcyAddOn
- 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.
-