Class TLcyLspBingMapsFormatAddOn
- Since:
- 2012.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ALcyLspFormat
Returns a new data format for this add-on.createCopyrightComponent
(ILspView aView) Returns a component representing the copyright information of the Bing map layers contained inaView
which will be added on the map.protected final ALcyLspFormat
createFormatWrapper
(ALcyLspFormat aBaseFormat) Returns a new data format wrapper for this add-on.createLogoComponent
(ILspView aView) Returns a component representing the logo of the Bing map layers contained inaView
which will be added on the map.void
plugInto
(ILcyLucyEnv aLucyEnv) Creates and plugs in the add-on's format and preferences tool.Methods inherited from class com.luciad.lucy.addons.lightspeed.ALcyLspFormatAddOn
createFormatTool, getFormat, unplugFrom
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
-
TLcyLspBingMapsFormatAddOn
public TLcyLspBingMapsFormatAddOn()Creates a newTLcyLspBingMapsFormatAddOn
-
-
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:
-
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:
-
createCopyrightComponent
Returns a component representing the copyright information of the Bing map layers contained in
aView
which will be added on the map.This method will be called once for the view of each created
ILcyLspMapComponent
. It is up to the returned component to keep its state in sync with the state ofaView
. E.g. when a Bing layer is added, the component should contain the relevant copyright information. When the scale of the view changes, the copyright info in the component should be updated, ... .- Parameters:
aView
- The view- Returns:
- a self-updating component representing the copyright information of the Bing map layers
contained in
aView
-
createLogoComponent
Returns a component representing the logo of the Bing map layers contained in
aView
which will be added on the map.This method will be called once for the view of each created
ILcyLspMapComponent
. It is up to the returned component to keep its state in sync with the state ofaView
. E.g. when a Bing layer is added, the component should contain the relevant logo.- Parameters:
aView
- The view- Returns:
- a self-updating component representing the logo of the Bing map layers contained in
aView
-