Class TLcyMS2525bAddOn
This add-on allows to visualize and edit MIL-STD 2525 data on a GXY map.
Visualization and editing on a Lightspeed map is taken care of by the TLcyLspMS2525bAddOn
.
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 anALcyFormatAddOn
, 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 GXYMS2525FormatBarFactory
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 CustomGXYMS2525FormatBarFactory();
}
}
}
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 TLcyLspMS2525bAddOn
.
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 EditableMS2525ObjectCustomizerPanel
and EditableMS2525ObjectCustomizerPanelFactory
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 CustomEditableMS2525ObjectCustomizerPanelFactory()
}
}
}
}
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ALcyFormat
Returns a new data format for this add-on.protected ALcyFormat
createFormatWrapper
(ALcyFormat aBaseFormat) Returns a new data format wrapper for this add-on.Methods inherited from class com.luciad.internal.lucy.addons.milstd2525b.ALinMS2525bAddOn
plugInto, unplugFrom
Methods inherited from class com.luciad.lucy.addons.ALcyFormatAddOn
createFormatTool, getFormat
Methods inherited from class com.luciad.lucy.addons.ALcyPreferencesAddOn
createPreferencesTool, getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
Methods inherited from class com.luciad.lucy.addons.ALcyAddOn
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
-
Constructor Details
-
TLcyMS2525bAddOn
public TLcyMS2525bAddOn()
-
-
Method Details
-
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 classALcyFormatAddOn
- Returns:
- a new format for this add-on
-
createFormatWrapper
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 classcom.luciad.internal.lucy.addons.milstd2525b.ALinMS2525bAddOn
- Parameters:
aBaseFormat
- the base format to wrap- Returns:
- a new format for this add-on
- See Also:
-