Example #1
0
 public void setLayer(int index, MapLayer layer) {
   layer.setMap(this);
   super.setLayer(index, layer);
   fireMapChanged();
   fireLayerRemoved(index);
   fireLayerAdded(index);
 }
Example #2
0
 /**
  * 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;
 }
Example #3
0
 @Override
 public MapLayer addLayer(MapLayer layer) {
   layer.setMap(this);
   super.addLayer(layer);
   layer.addMapLayerChangeListener(this);
   fireMapChanged();
   fireLayerAdded(getLayerVector().indexOf(layer));
   return layer;
 }
Example #4
0
 /**
  * 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();
 }
Example #5
0
 /**
  * Calls super method, and additionally fires a {@link MapChangedEvent}.
  *
  * @see MultilayerPlane#mergeLayerDown
  */
 public void mergeLayerDown(int index) {
   super.mergeLayerDown(index);
   fireMapChanged();
 }
Example #6
0
 /**
  * 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);
 }
Example #7
0
 /**
  * Calls super method, and additionally fires a {@link MapChangedEvent}.
  *
  * @see MultilayerPlane#setLayerVector
  */
 public void setLayerVector(Vector<MapLayer> layers) {
   super.setLayerVector(layers);
   fireMapChanged();
 }
Example #8
0
 public void insertLayer(int index, MapLayer layer) {
   super.insertLayer(index, layer);
   layer.addMapLayerChangeListener(this);
   fireMapChanged();
   fireLayerAdded(index);
 }