/** * Add a new CLayer to the "deck" of layers associated with this CWindow. This method will * sequentially add layers to the window, placing subsequently added layers on top of previously * added layers. * * @param layer the new layer to add to this window * @return true if new layer was added, false otherwise */ public boolean addLayer(CLayer layer) { if (layer != null) { if (CGraphicsQ.DEBUG) { System.err.println("Add Layer: " + layer); } synchronized (layers) { if (layers.find(layer) == null) { layer.owner = this; layers.addLayer(layer); layer.addDirtyRegion(); requestRepaint(); layer.addNotify(); return true; } } } return false; }