Class TLcyLspMS2525bAddOn
This add-on registers the Lightspeed related functionality of the TLcyMS2525bAddOn
. It creates a format
which creates the necessary factories. This format can be modified by
overriding the createBaseFormat()
method.
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 anALcyLspFormatAddOn
, 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 LspMS2525FormatBarFactory
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 ALcyLspFormat.createFormatBarFactory()
:
@Override
protected ALcyLspFormat createBaseFormat(){
return new ALcyLspFormatWrapper(super.createBaseFormat()){
@Override
protected ALcyFormatBarFactory createFormatBarFactory(){
return new CustomLspMS2525FormatBarFactory();
}
}
}
Adjusting the object properties panel
The object properties panel, which contains the UI to modify an existing domain object, is also available as sample code.
However, the object properties panel is shared between GXY and Lightspeed as it has no view-specific dependency.
Therefore it is provided by the TLcyMS2525bAddOn
.
Consult the class javadoc of that add-on for more information on how to customize it.
- Since:
- 2013.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ALcyLspFormat
Returns a new data format for this add-on.protected final ALcyLspFormat
createFormatWrapper
(ALcyLspFormat aBaseFormat) Returns a new data format wrapper for this add-on.void
plugInto
(ILcyLucyEnv aLucyEnv) Creates and plugs in the add-on's format and preferences tool.void
unplugFrom
(ILcyLucyEnv aLucyEnv) Unplugs the add-on's format and preferences tool.Methods inherited from class com.luciad.lucy.addons.lightspeed.ALcyLspFormatAddOn
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
-
TLcyLspMS2525bAddOn
public TLcyLspMS2525bAddOn()Creates a newTLcyLspMS2525bAddOn
instance.
-
-
Method Details
-
plugInto
Description copied from class:ALcyLspFormatAddOn
Creates and plugs in the add-on's format and preferences tool.- Overrides:
plugInto
in classALcyLspFormatAddOn
- Parameters:
aLucyEnv
- the Lucy environment to plug into- See Also:
-
unplugFrom
Description copied from class:ALcyLspFormatAddOn
Unplugs the add-on's format and preferences tool.- Overrides:
unplugFrom
in classALcyLspFormatAddOn
- Parameters:
aLucyEnv
- the Lucy environment- See Also:
-
createBaseFormat
Description copied from class:ALcyLspFormatAddOn
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 ALcyLspFormat createBaseFormat() { return new ALcyLspFormatWrapper(super.createBaseFormat()){ @Override protected ILspLayerFactory createLayerFactory(){ final ILspLayerFactory delegate = super.createLayerFactory(); return new ILspLayerFactory(){ @Override public boolean canCreateLayers(ILcdModel aModel){ return delegate.canCreateLayers(aModel); } @Override public Collection<ILspLayer> createLayers(ILcdModel aModel){ Collection<ILspLayer> layers = delegate.createLayers(aModel); for(ILspLayer layer : layers){ ILcdIcon icon = ...; layer.setIcon(icon) } return layers; } } } } }
- Specified by:
createBaseFormat
in classALcyLspFormatAddOn
- Returns:
- a new format for this add-on
-
createFormatWrapper
Description copied from class:ALcyLspFormatAddOn
Returns a new data format wrapper for this add-on. A format wrapper extends the base format with aspects such as 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).
- Specified by:
createFormatWrapper
in classALcyLspFormatAddOn
- Parameters:
aBaseFormat
- the base format to wrap- Returns:
- a new format for this add-on
- See Also:
-