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.
ALcyFormatAddOn
, this add-on offers some extra customization
options by exposing certain parts of the UI as sample code.
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
.
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 and Description |
---|
TLcyAPP6AAddOn()
Constructs a new
TLcyAPP6AAddOn instance. |
Modifier and Type | Method and Description |
---|---|
protected ALcyFormat |
createBaseFormat()
Returns a new data format for this add-on.
|
protected ALcyFormat |
createFormatWrapper(ALcyFormat aBaseFormat)
Returns a new data format wrapper for this add-on.
|
plugInto, unplugFrom
createFormatTool, getFormat
createPreferencesTool, getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
protected ALcyFormat createBaseFormat()
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;
}
}
}
}
}
createBaseFormat
in class ALcyFormatAddOn
protected final ALcyFormat createFormatWrapper(ALcyFormat aBaseFormat)
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).
createFormatWrapper
in class com.luciad.internal.lucy.addons.app6a.ALinAPP6AAddOn
aBaseFormat
- the base format to wrapALcyFormatWrapper