Package com.luciad.lucy.map
Interface ILcyMapManager
- All Superinterfaces:
ILcdPropertyChangeSource
- All Known Implementing Classes:
TLcyMapManager
Manager of the
ILcyMapComponent
s 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 ILcyMapComponent
s, 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 TypeMethodDescriptionvoid
addMapComponent
(ILcyMapComponent aMapComponent) Adds the given map to thisILcyMapManager
.void
addMapManagerListener
(ILcyMapManagerListener aMapManagerListener) Adds the givenILcyMapManagerListener
to thisILcyMapManager
.Returns null, or the activeILcyMapComponent
.getMapComponent
(int aIndex) Returns theILcyMapComponent
at the given index.int
Returns the number of currently existingILcyMapComponent
s.void
removeMapComponent
(ILcyMapComponent aMapComponent) Removes the given map from thisILcyMapManager
.void
removeMapManagerListener
(ILcyMapManagerListener aMapManagerListener) Removes the givenILcyMapManagerListener
to thisILcyMapManager
.void
setActiveMapComponent
(ILcyMapComponent aMapComponent) Sets the active map component.Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Method Details
-
addMapManagerListener
Adds the givenILcyMapManagerListener
to thisILcyMapManager
.- Parameters:
aMapManagerListener
- The listener to add.
-
removeMapManagerListener
Removes the givenILcyMapManagerListener
to thisILcyMapManager
.- Parameters:
aMapManagerListener
- The listener to remove.
-
getMapComponentCount
int getMapComponentCount()Returns the number of currently existingILcyMapComponent
s.- Returns:
- the number of currently existing
ILcyMapComponent
s.
-
getMapComponent
Returns theILcyMapComponent
at the given index.- Parameters:
aIndex
- the index of theILcyMapComponent
to return.- Returns:
- the
ILcyMapComponent
at the given index.
-
addMapComponent
Adds the given map to thisILcyMapManager
. Whenever a newILcyMapComponent
is instantiated, this method needs to be invoked. The responsibility to do this belongs to whoever created the map, for example theTLcyMapAddOn
.- Parameters:
aMapComponent
- TheILcyMapComponent
to add.- See Also:
-
removeMapComponent
Removes the given map from thisILcyMapManager
. Whenever aILcyMapComponent
is removed, this method needs to be invoked. The responsibility to do this belongs to whoever disposed the map, for example theTLcyMapAddOn
.- Parameters:
aMapComponent
- TheILcyMapComponent
to 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.
-