BasicLayerConfigurationListener (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.event
Class BasicLayerConfigurationListener

    java.lang.Object
      com.bbn.openmap.MapHandlerChild
          com.bbn.openmap.OMComponent
              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 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. 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.

Author:
  dietrick

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
`BasicLayerConfigurationListener()`

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

### BasicLayerConfigurationListener

    public BasicLayerConfigurationListener()

Method Detail

### checkLayerConfiguration

    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`
  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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