public void findAndUndo(Object someObj){
  if (someObj instanceof LayerListener) {
    logger.fine("LayerListener object is being removed");
    removeLayerListener((LayerListener)someObj);
  }
  if (someObj instanceof LayerConfigurationListener) {
    logger.fine("LayerConfigurationListener is being removed.");
    removeLayerConfigurationListener((LayerConfigurationListener)someObj);
  }
  if (someObj instanceof Layer) {
    removeLayer((Layer)someObj);
  }
  if (someObj instanceof PlugIn) {
    PlugIn pi=(PlugIn)someObj;
    Component comp=pi.getComponent();
    if (comp instanceof Layer && hasLayer((Layer)comp)) {
      removeLayer((Layer)comp);
    }
  }
  if (someObj instanceof PropertyHandler && someObj == getPropertyHandler()) {
    setPropertyHandler(null);
  }
}

public void findAndUndo ( Object someObj ) { if ( someObj instanceof LayerListener ) { logger . fine ( "LayerListener object is being removed" ) ; removeLayerListener ( ( LayerListener ) someObj ) ; } if ( someObj instanceof LayerConfigurationListener ) { logger . fine ( "LayerConfigurationListener is being removed." ) ; removeLayerConfigurationListener ( ( LayerConfigurationListener ) someObj ) ; } if ( someObj instanceof Layer ) { removeLayer ( ( Layer ) someObj ) ; } if ( someObj instanceof PlugIn ) { PlugIn pi = ( PlugIn ) someObj ; Component comp = pi . getComponent ( ) ; if ( comp instanceof Layer && hasLayer ( ( Layer ) comp ) ) { removeLayer ( ( Layer ) comp ) ; } } if ( someObj instanceof PropertyHandler && someObj == getPropertyHandler ( ) ) { setPropertyHandler ( null ) ; } }
a beancontextmembershiplistener interface method , which is called when new objects are removed from the beancontext . if a layerlistener or layer is found on this list , it is removed from the list of layerlisteners .
