Beispiel #1
0
 /**
  * Remove a layer from this CWindow. This method will remove the given layer from the "deck" of
  * layers associated with this CWindow. If successfull, this method will return true, false
  * otherwise (for example, if the layer does not belong to this window).
  *
  * @param layer the layer to remove from this window
  * @return true if successful, false otherwise
  */
 public boolean removeLayer(CLayer layer) {
   synchronized (layers) {
     CLayerElement le = sweepLayer(layer);
     if (le != null) {
       if (CGraphicsQ.DEBUG) {
         System.err.println("Remove Layer: " + layer);
       }
       layer.owner = null;
       requestRepaint();
       layers.removeLayerElement(le);
       layer.removeNotify(this);
       return true;
     }
   }
   return false;
 }