skrueger.geotools
Interface MapContextManagerInterface


public interface MapContextManagerInterface

Implementations of this class can can be used to fill/insert/remove a mapContext with StyledLayerInterface objects.

Author:
Stefan Alfons Krüger

Method Summary
 void addMapLayerListListener(MapLayerListListener listener)
          Add MapLayerListListener
 boolean addStyledLayer(StyledLayerInterface<?> styledLayer)
          Add a StyledLayerInterface object into the underlying MapContext as the topmost layer
 void dispose()
          Help the GC by disposing this Component
 String getDescFor(MapLayer mapLayer)
          Returns the description of the layer
 RasterLegendData getLegendMetaData(MapLayer mapLayer)
          Returns the RasterLegendData object for the layer.
 MapContext getMapContext()
           
 StyledLayerInterface<?> getStyledObjectFor(MapLayer layer)
          Returns the StyledLayerInterface object that is associated with the layer or NULL if the layer can't be found.
 List<StyledLayerInterface<?>> getStyledObjects()
          Returns a ordered list of the layers that are contained in the underlying MapContext
 String getTitleFor(MapLayer mapLayer)
          Returns the title of the layer
 List<AttributeMetadata> getVisibleAttribsFor(MapLayer mapLayer)
          Returns a list of AttributeMetadata that shall be shown (e.g. when the Mouse clicked into the map) Returns an empty list if the layer doesn't exist or is not backed by a StyledFeatureCollectionInterface
 boolean insertStyledLayer(StyledLayerInterface<?> styledLayer, int mapContextIdx)
          Inserts a StyledLayerInterface object into the underlying MapContext at the given position
 void removeMapLayerListListener(MapLayerListListener listener)
          Remove MapLayerListListener
 boolean removeStyledLayer(int mapContextIdx)
           
 

Method Detail

addStyledLayer

boolean addStyledLayer(StyledLayerInterface<?> styledLayer)
Add a StyledLayerInterface object into the underlying MapContext as the topmost layer

Parameters:
styledLayer - Layer to add to the map

removeStyledLayer

boolean removeStyledLayer(int mapContextIdx)
Parameters:
mapContextIdx - Index in the MapContext, bottom first
Returns:
successful?

insertStyledLayer

boolean insertStyledLayer(StyledLayerInterface<?> styledLayer,
                          int mapContextIdx)
Inserts a StyledLayerInterface object into the underlying MapContext at the given position


addMapLayerListListener

void addMapLayerListListener(MapLayerListListener listener)
Add MapLayerListListener


removeMapLayerListListener

void removeMapLayerListListener(MapLayerListListener listener)
Remove MapLayerListListener


dispose

void dispose()
Help the GC by disposing this Component


getStyledObjects

List<StyledLayerInterface<?>> getStyledObjects()
Returns a ordered list of the layers that are contained in the underlying MapContext


getVisibleAttribsFor

List<AttributeMetadata> getVisibleAttribsFor(MapLayer mapLayer)
Returns a list of AttributeMetadata that shall be shown (e.g. when the Mouse clicked into the map) Returns an empty list if the layer doesn't exist or is not backed by a StyledFeatureCollectionInterface


getTitleFor

String getTitleFor(MapLayer mapLayer)
Returns the title of the layer

Parameters:
mapLayer - MapLayer
Returns:
null, if the layer is unknown

getDescFor

String getDescFor(MapLayer mapLayer)
Returns the description of the layer

Parameters:
mapLayer - MapLayer
Returns:
null, if the layer is unknown. Empty String if the description is empty

getLegendMetaData

RasterLegendData getLegendMetaData(MapLayer mapLayer)
Returns the RasterLegendData object for the layer.

Returns:
null, if the layer is not found or of type raster

getStyledObjectFor

StyledLayerInterface<?> getStyledObjectFor(MapLayer layer)
Returns the StyledLayerInterface object that is associated with the layer or NULL if the layer can't be found.


getMapContext

MapContext getMapContext()
Returns:
The MapContext managed by this MapContextManagerInterface