public void findAndInit(Object someObj){
  if (someObj instanceof LayerHandler) {
    logger.fine("LayersPanel found a LayerHandler");
    setLayerHandler((LayerHandler)someObj);
  }
  if (someObj instanceof BufferedLayerMapBean) {
    logger.fine("LayersPanel found BufferedLayerMapBean, creating separator panel");
    backgroundLayerSeparator=LayerPane.getBackgroundLayerSeparator(" --- Background Layers --- ");
  }
  if (controls != null && someObj != this) {
    controls.findAndInit(someObj);
  }
}

public void findAndInit ( Object someObj ) { if ( someObj instanceof LayerHandler ) { logger . fine ( "LayersPanel found a LayerHandler" ) ; setLayerHandler ( ( LayerHandler ) someObj ) ; } if ( someObj instanceof BufferedLayerMapBean ) { logger . fine ( "LayersPanel found BufferedLayerMapBean, creating separator panel" ) ; backgroundLayerSeparator = LayerPane . getBackgroundLayerSeparator ( " --- Background Layers --- " ) ; } if ( controls != null && someObj != this ) { controls . findAndInit ( someObj ) ; } }
called when the layerspanel is added the beancontext , or when another object is added to the beancontext after the layerhandler has been added . this allows the layerspanel to keep up - to - date with any objects that it may be interested in , namely , the layerhandler . if a layerhandler has already been added , the new layerhandler will replace it .
