com.bbn.openmap.event
Interface LayerConfigurationListener

All Known Implementing Classes:
BasicLayerConfigurationListener

public interface LayerConfigurationListener

A LayerConfigurationListener is a component that receives LayerEvents from the LayerHandler before changes are implemented, so conditions can be implemented to the layer list. These conditions may include controlling which layers are enabled at the same time, or controlling the projection used when certain layers are activated. You can add this component to the components property in the openmap.properties file, or simply add it to the MapHandler. The LayerHandler will find it and add it as a listener, and then start making calls to the checkLayerConfiguration method. The LayerConfiguratListener.checkLayerConfiguration(List layers) is called before new changes are applied to the layer cake in the application. If changes are desired, they should be returned from this method. If no changes are required, then null should be returned. You should only return something from this method if the layer order is modified, or layers should be added or removed from the LayerHandler. If you add or remove layers here, they will not be added to the MapHandler.

Author:
dietrick

Method Summary
 java.util.List<Layer> checkLayerConfiguration(java.util.List<Layer> layers)
          The LayerConfiguratListener.checkLayerConfiguration(List layers) is called before new changes are applied to the layer cake in the application.
 

Method Detail

checkLayerConfiguration

java.util.List<Layer> checkLayerConfiguration(java.util.List<Layer> layers)
The LayerConfiguratListener.checkLayerConfiguration(List layers) is called before new changes are applied to the layer cake in the application. If changes are desired, they should be returned from this method. If no changes are required, then null should be returned.

Parameters:
layers - a List of layers
Returns:
the layers as they should be modified. If you just want to change which layers will be visible on the map, you can toggle the visibility of the layer directory (setVisible(boolean)), and you don't have to return anything. Anything you return will be set as the available Layer list in the LayerHandler. Use with care.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details