src/main/java/chalmers/pimp/model/canvas/LayerManager.java
void changeDepthIndex(int layerIndex, int dz) {
    if (dz == 0) {
      return;
    }

    if (inBounds(layerIndex)) {
      boolean movingFirstLayerBack = (layerIndex == 0) && (dz < 0);
      boolean movingLastLayerForward = (layerIndex == (layers.size() - 1)) && (dz > 0);
      if (movingFirstLayerBack || movingLastLayerForward) {
        return;
      }

      layers.add(layerIndex + dz, layers.remove(layerIndex));
      resetDepthValues();

      var event = new LayerUpdateEvent(layers);
      layerUpdateListeners.layersUpdated(event);
    }
  }
/**
   * Offsets the depth index (the z-value) of the layer associated with the supplied layer depth
   * index with the supplied offset. This method has no effect if the supplied offset is zero or if
   * there isn't a layer associated with the supplied layer depth index.
   *
   * @param layerIndex the layer depth index associated with the layer that will be "moved".
   * @param dz         the z-axis offset, may be either negative or positive.
   */
Offsets the depth index (the z-value) of the layer associated with the supplied layer depth
index with the supplied offset. This method has no effect if the supplied offset is zero or if
there isn't a layer associated with the supplied layer depth index.

@param layerIndex the layer depth index associated with the layer that will be "moved".
@param dz         the z-axis offset, may be either negative or positive.
Offsets the depth index ( the z - value ) of the layer associated with the supplied layer depth index with the supplied offset . This method has no effect if the supplied offset is zero or if there isn ' t a layer associated with the supplied layer depth index . @param layerIndex the layer depth index associated with the layer that will be " moved " . @param dz the z - axis offset may be either negative or positive .
void changeDepthIndex(int layerIndex, int dz) {
    if (dz == 0) {
      return;
    }
    if (inBounds(layerIndex)) {
      boolean movingFirstLayerBack = (layerIndex == 0) && (dz < 0);
      boolean movingLastLayerForward = (layerIndex == (layers.size() - 1)) && (dz > 0);
      if (movingFirstLayerBack || movingLastLayerForward) {
        return;
      }
      layers.add(layerIndex + dz, layers.remove(layerIndex));
      resetDepthValues();
      var event = new LayerUpdateEvent(layers);
      layerUpdateListeners.layersUpdated(event);
    }
  }
void changeDepthIndex ( int layerIndex , int dz ) { if ( dz == 0 ) { return ; } if ( inBounds ( layerIndex ) ) { boolean movingFirstLayerBack = ( layerIndex == 0 ) && ( dz < 0 ) ; boolean movingLastLayerForward = ( layerIndex == ( layers . size ( ) - 1 ) ) && ( dz > 0 ) ; if ( movingFirstLayerBack || movingLastLayerForward ) { return ; } layers . add ( layerIndex + dz , layers . remove ( layerIndex ) ) ; resetDepthValues ( ) ; var event = new LayerUpdateEvent ( layers ) ; layerUpdateListeners . layersUpdated ( event ) ; } }
Offsets the depth index (the z-value) of the layer associated with the supplied layer depth
 index with the supplied offset.
Offsets the depth index ( the z - value ) of the layer associated with the supplied layer depth index with the supplied offset .