question: public void findAndUndo ( Object someObj ) { if ( someObj instanceof LayerHandler ) { logger . fine ( "LayersPanel removing LayerHandler" ) ; if ( getLayerHandler ( ) == ( LayerHandler ) someObj ) { setLayerHandler ( null ) ; } } if ( controls != null && someObj != this ) { controls . findAndUndo ( someObj ) ; } if ( someObj instanceof Layer ) { paneLookUp . remove ( ( Layer ) someObj ) ; } }
target:  BeanContextMembershipListener method. Called when an object has been removed from the parent BeanContext. If a LayerHandler is removed, and it's the current one being listened to, then the layers in the panel will be wiped clean.