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