public interface ILcyMapManager extends ILcdPropertyChangeSource
ILcyMapComponent
s that currently exist. A map manager
offers functionality to:
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.ILcyMapComponent
Modifier and Type | Method and Description |
---|---|
void |
addMapComponent(ILcyMapComponent aMapComponent)
Adds the given map to this
ILcyMapManager . |
void |
addMapManagerListener(ILcyMapManagerListener aMapManagerListener)
Adds the given
ILcyMapManagerListener to this ILcyMapManager . |
ILcyMapComponent |
getActiveMapComponent()
Returns null, or the active
ILcyMapComponent . |
ILcyMapComponent |
getMapComponent(int aIndex)
Returns the
ILcyMapComponent at the given index. |
int |
getMapComponentCount()
Returns the number of currently existing
ILcyMapComponent s. |
void |
removeMapComponent(ILcyMapComponent aMapComponent)
Removes the given map from this
ILcyMapManager . |
void |
removeMapManagerListener(ILcyMapManagerListener aMapManagerListener)
Removes the given
ILcyMapManagerListener to this ILcyMapManager . |
void |
setActiveMapComponent(ILcyMapComponent aMapComponent)
Sets the active map component.
|
addPropertyChangeListener, removePropertyChangeListener
void addMapManagerListener(ILcyMapManagerListener aMapManagerListener)
ILcyMapManagerListener
to this ILcyMapManager
.aMapManagerListener
- The listener to add.void removeMapManagerListener(ILcyMapManagerListener aMapManagerListener)
ILcyMapManagerListener
to this ILcyMapManager
.aMapManagerListener
- The listener to remove.int getMapComponentCount()
ILcyMapComponent
s.ILcyMapComponent
s.ILcyMapComponent getMapComponent(int aIndex)
ILcyMapComponent
at the given index.aIndex
- the index of the ILcyMapComponent
to return.ILcyMapComponent
at the given index.void addMapComponent(ILcyMapComponent aMapComponent)
ILcyMapManager
. Whenever
a new ILcyMapComponent
is instantiated, this method needs to
be invoked. The responsibility to do this belongs to whoever created the
map, for example the TLcyMapAddOn
.aMapComponent
- The ILcyMapComponent
to add.ILcyMapManager
void removeMapComponent(ILcyMapComponent aMapComponent)
ILcyMapManager
. Whenever
a ILcyMapComponent
is removed, this method needs to
be invoked. The responsibility to do this belongs to whoever disposed
the map, for example the TLcyMapAddOn
.aMapComponent
- The ILcyMapComponent
to remove.ILcyMapManager
ILcyMapComponent getActiveMapComponent()
ILcyMapComponent
. 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.ILcyMapComponent
.void setActiveMapComponent(ILcyMapComponent aMapComponent)
TLcyMapAddOn
, as the user starts working
on a different map.
Fires a property change event.aMapComponent
- The active map component, or null.