public void setLayer(int index, MapLayer layer) { layer.setMap(this); super.setLayer(index, layer); fireMapChanged(); fireLayerRemoved(index); fireLayerAdded(index); }
/** * Create a new empty ObjectGroup. By default, the new layer's name is set to "ObjectGroup [layer * index]" * * @return The new ObjectGroup instance. */ public MapLayer addObjectGroup() { MapLayer layer = new ObjectGroup(this); layer.setName( Resources.getString("general.objectgroup.objectgroup") + " " + super.getTotalLayers()); super.addLayer(layer); fireMapChanged(); return layer; }
@Override public MapLayer addLayer(MapLayer layer) { layer.setMap(this); super.addLayer(layer); layer.addMapLayerChangeListener(this); fireMapChanged(); fireLayerAdded(getLayerVector().indexOf(layer)); return layer; }
/** * Calls super method, and additionally fires a {@link MapChangedEvent}. * * @see MultilayerPlane#resize */ public void resize(int width, int height, int dx, int dy) { super.resize(width, height, dx, dy); fireMapChanged(); }
/** * Calls super method, and additionally fires a {@link MapChangedEvent}. * * @see MultilayerPlane#mergeLayerDown */ public void mergeLayerDown(int index) { super.mergeLayerDown(index); fireMapChanged(); }
/** * Calls super method, and additionally fires a {@link MapChangedEvent}. * * @see MultilayerPlane#swapLayerDown */ public void swapLayerDown(int index) { super.swapLayerDown(index); fireMapChanged(); fireLayerMoved(index, index - 1); }
/** * Calls super method, and additionally fires a {@link MapChangedEvent}. * * @see MultilayerPlane#setLayerVector */ public void setLayerVector(Vector<MapLayer> layers) { super.setLayerVector(layers); fireMapChanged(); }
public void insertLayer(int index, MapLayer layer) { super.insertLayer(index, layer); layer.addMapLayerChangeListener(this); fireMapChanged(); fireLayerAdded(index); }