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.
Modifier and Type | Field and Description |
---|---|
static TLcyGroupDescriptor |
SELECTION_EDITOR_GROUP_DESCRIPTOR |
Constructor and Description |
---|
TLcySelectionEditorAddOn() |
Modifier and Type | Method and Description |
---|---|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
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. It is recommended to use the
standard Java logging framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
unplugFrom(ILcyLucyEnv aLucyEnv)
Unplugs this addon from the given Lucy environment.
|
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
public static final TLcyGroupDescriptor SELECTION_EDITOR_GROUP_DESCRIPTOR
@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.@Deprecated public void setTraceOn(boolean aTraceOn)
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.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.@Deprecated public boolean isTraceOn()
true
if tracing is enabled for this class.public void plugInto(ILcyLucyEnv aLucyEnv)
ALcyAddOn
plugInto
in class ALcyAddOn
aLucyEnv
- The lucy environment to plug into.ALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
public void unplugFrom(ILcyLucyEnv aLucyEnv)
ALcyAddOn
unplugFrom
in class ALcyAddOn
aLucyEnv
- The lucy environment to unplug from.ALcyAddOn.plugInto(com.luciad.lucy.ILcyLucyEnv)
public void setActiveOnMapComponent(boolean aActive, ILcyGenericMapComponent<? extends ILcdView,? extends ILcdLayer> aMapComponent)
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.