Class BasicLayerConfigurationListener

  extended by com.bbn.openmap.MapHandlerChild
      extended by com.bbn.openmap.OMComponent
          extended by com.bbn.openmap.event.BasicLayerConfigurationListener
All Implemented Interfaces:
LayerConfigurationListener, LightMapHandlerChild, PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener

public class BasicLayerConfigurationListener
extends OMComponent
implements LayerConfigurationListener

A LayerToggleConfigurationListener is a LayerConfigurationListener implementation that demonstrates how to create a component that might make adjustments to a List of layers being changed in a LayerHandler, before the changes hit the map. Right now, the only this component does is change the current projection to CADRG if an RPF layer is made active. You can add this component to the components property in the 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. If you want to adjust the visibility of layers, so that layers turn off or on based on other layers being activated, you can just set the visibility of the layer in this method without returning anything from the checkLayerConfiguration method. You only have to return a new List if you want to change the order, add or remove layers from the application.


Field Summary
Fields inherited from class com.bbn.openmap.OMComponent
i18n, propertyPrefix
Fields inherited from class com.bbn.openmap.MapHandlerChild
beanContextChildSupport, isolated
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor Summary
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.
Methods inherited from class com.bbn.openmap.OMComponent
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setProperties, setPropertyPrefix
Methods inherited from class com.bbn.openmap.MapHandlerChild
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public BasicLayerConfigurationListener()
Method Detail


public java.util.List<Layer> checkLayerConfiguration(java.util.List<Layer> layers)
Description copied from interface: LayerConfigurationListener
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.

Specified by:
checkLayerConfiguration in interface LayerConfigurationListener
layers - a List of layers
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 for details