src/main/java/chalmers/pimp/controller/components/LayerItemPane.java
private void handleDragDropped(DragEvent event) {
    Dragboard db = event.getDragboard();

    boolean success = false;

    if (db.hasString()) {
      int originDepth = Integer.parseInt(db.getString());

      if (model.hasActiveLayer()) {
        IReadOnlyLayer activeLayer = model.getActiveLayer();
        int dz = associatedLayerIndex - originDepth;
        model.changeLayerDepthIndex(activeLayer.getDepthIndex(), dz);
        success = true;
      }
    }

    event.setDropCompleted(success);
    event.consume();
  }
/**
   * Handles a drag event triggered by a drag drop on the layer item pane.
   *
   * @param event the associated drag event.
   */
Handles a drag event triggered by a drag drop on the layer item pane.
@param event the associated drag event.
Handles a drag event triggered by a drag drop on the layer item pane . @param event the associated drag event .
private void handleDragDropped(DragEvent event) {
    Dragboard db = event.getDragboard();
    boolean success = false;
    if (db.hasString()) {
      int originDepth = Integer.parseInt(db.getString());
      if (model.hasActiveLayer()) {
        IReadOnlyLayer activeLayer = model.getActiveLayer();
        int dz = associatedLayerIndex - originDepth;
        model.changeLayerDepthIndex(activeLayer.getDepthIndex(), dz);
        success = true;
      }
    }
    event.setDropCompleted(success);
    event.consume();
  }
private void handleDragDropped ( DragEvent event ) { Dragboard db = event . getDragboard ( ) ; boolean success = false ; if ( db . hasString ( ) ) { int originDepth = Integer . parseInt ( db . getString ( ) ) ; if ( model . hasActiveLayer ( ) ) { IReadOnlyLayer activeLayer = model . getActiveLayer ( ) ; int dz = associatedLayerIndex - originDepth ; model . changeLayerDepthIndex ( activeLayer . getDepthIndex ( ) , dz ) ; success = true ; } } event . setDropCompleted ( success ) ; event . consume ( ) ; }
Handles a drag event triggered by a drag drop on the layer item pane.
Handles a drag event triggered by a drag drop on the layer item pane .