App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

UpdateLayerFromPresentationCommand.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
9 public class UpdateLayerFromPresentationCommand extends AppCommand {
10
11 protected int layerId;
12
17 public UpdateLayerFromPresentationCommand(int layerId) {
18 this.layerId = layerId;
19 }
20
21 @Override
22 protected void action(AppCore target) {
23 synchronized (this) {
24 target.getRenderer().susepnd(this);
25 try {
26 this.wait();
27 } catch (InterruptedException e) {
28
29 }
30 try {
31 target.getImg().updateLayerFromSpecificPresentation(layerId);
32 target.getRenderer().renderOnThisThread();
33 } finally {
34 target.getRenderer().wake(this);
35 }
36 }
37 }
38 }