Package com.luciad.lucy.map
Interface ILcyMapManager
- All Superinterfaces:
ILcdPropertyChangeSource
- All Known Implementing Classes:
TLcyMapManager
Manager of the
ILcyMapComponents that currently exist. A map manager
offers functionality to:
- retrieve all existing maps,
- listen to the creation of new maps,
- listen for the removal of existing maps or
- retrieve the active map.
ILcyMapComponent is created, it needs to be added to
the ILcyMapManager. When a map is removed, it needs to be removed
from the ILcyMapManager. The responsibility to do this belongs to
whoever created or disposed the map, for example the TLcyMapAddOn.
Note that this map manager only deals with ILcyMapComponents, which are 2D.
For other map components, refer to TLcyCombinedMapManager, or a specific
TLcyGenericMapManager for the map component type you are interested in.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapComponent(ILcyMapComponent aMapComponent) Adds the given map to thisILcyMapManager.voidaddMapManagerListener(ILcyMapManagerListener aMapManagerListener) Adds the givenILcyMapManagerListenerto thisILcyMapManager.Returns null, or the activeILcyMapComponent.getMapComponent(int aIndex) Returns theILcyMapComponentat the given index.intReturns the number of currently existingILcyMapComponents.default List<ILcyMapComponent> Returns aListof the map components.voidremoveMapComponent(ILcyMapComponent aMapComponent) Removes the given map from thisILcyMapManager.voidremoveMapManagerListener(ILcyMapManagerListener aMapManagerListener) Removes the givenILcyMapManagerListenerto thisILcyMapManager.voidsetActiveMapComponent(ILcyMapComponent aMapComponent) Sets the active map component.Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Method Details
-
addMapManagerListener
Adds the givenILcyMapManagerListenerto thisILcyMapManager.- Parameters:
aMapManagerListener- The listener to add.
-
removeMapManagerListener
Removes the givenILcyMapManagerListenerto thisILcyMapManager.- Parameters:
aMapManagerListener- The listener to remove.
-
getMapComponentCount
int getMapComponentCount()Returns the number of currently existingILcyMapComponents.- Returns:
- the number of currently existing
ILcyMapComponents.
-
getMapComponent
Returns theILcyMapComponentat the given index.- Parameters:
aIndex- the index of theILcyMapComponentto return.- Returns:
- the
ILcyMapComponentat the given index.
-
getMapComponents
Returns aListof the map components.- Returns:
- an unmodifiable
Listof the map components known to this manager. - Since:
- 2025.0
-
addMapComponent
Adds the given map to thisILcyMapManager. Whenever a newILcyMapComponentis instantiated, this method needs to be invoked. The responsibility to do this belongs to whoever created the map, for example theTLcyMapAddOn.- Parameters:
aMapComponent- TheILcyMapComponentto add.- See Also:
-
removeMapComponent
Removes the given map from thisILcyMapManager. Whenever aILcyMapComponentis removed, this method needs to be invoked. The responsibility to do this belongs to whoever disposed the map, for example theTLcyMapAddOn.- Parameters:
aMapComponent- TheILcyMapComponentto remove.- See Also:
-
getActiveMapComponent
ILcyMapComponent getActiveMapComponent()Returns null, or the activeILcyMapComponent. The active map is the one that the user is working on, or has recently worked on. The active map component is typically null if there are no maps.- Returns:
- null, or the active
ILcyMapComponent.
-
setActiveMapComponent
Sets the active map component. This property is typically set by the responsible for the maps, for example theTLcyMapAddOn, as the user starts working on a different map. Fires a property change event.- Parameters:
aMapComponent- The active map component, or null.
-