App
DuplicateLayerCommand.java
Go to the documentation of this file.
1 package mhr.appcore.commands.imagecommands;
2 
3 import mhr.appcore.AppCore;
4 import mhr.appcore.commands.AppCommand;
5 import mhr.appcore.image.layers.LayerType;
6 
10 public class DuplicateLayerCommand extends AppCommand {
11 
12  protected int layerId;
13 
19  this.layerId = layerId;
20  }
21 
22  @Override
23  protected void action(AppCore target) {
24  synchronized (this) {
25  target.getRenderer().susepnd(this);
26  try {
27  this.wait();
28  } catch (InterruptedException e) {
29 
30  }
31  try {
32  target.getImg().duplicateLayer(layerId);
34  } finally {
35  target.getRenderer().wake(this);
36  }
37  }
38  }
39 
40 }