/** * Add a camera to this layer's camera list. This method it called * automatically when a layer is added to a camera. * * @param camera the camera to add to this layer */ public void addCamera(final PCamera camera) { addCamera(cameras.size(), camera); }
/** * Inserts the specified layer at the specified position in the list of layers viewed by this camera. * Layers may be viewed by multiple cameras at once. * * @param index index at which the specified layer is to be inserted * @param layer layer to add * @throws IndexOutOfBoundsException if the specified index is out of range * (<code>index < 0 || index >= getLayerCount()</code>) */ public void addLayer(final int index, final PLayer layer) { layers.add(index, layer); layer.addCamera(this); invalidatePaint(); firePropertyChange(PROPERTY_CODE_LAYERS, PROPERTY_LAYERS, null, layers); }