diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:36:50 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 15:25:03 +0100 |
commit | 41ac47d732eed8392d60d0f6773e5a279d49b999 (patch) | |
tree | cf19d099db9cfdb8d73aa21c31e7aa1cc86ff860 /plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java | |
download | eclipse-poky-juno-41ac47d732eed8392d60d0f6773e5a279d49b999.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java')
-rw-r--r-- | plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java new file mode 100644 index 0000000..5fbab76 --- /dev/null +++ b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java | |||
@@ -0,0 +1,26 @@ | |||
1 | package org.yocto.remote.utils; | ||
2 | |||
3 | import org.eclipse.jface.dialogs.MessageDialog; | ||
4 | |||
5 | public class DialogRunnable implements Runnable{ | ||
6 | int type = 0; | ||
7 | boolean result; | ||
8 | public static final int QUESTION = 1; | ||
9 | public static final int ERROR = 2; | ||
10 | String title; | ||
11 | String message; | ||
12 | |||
13 | DialogRunnable(String title, String message, int type){ | ||
14 | this.title = title; | ||
15 | this.message = message; | ||
16 | this.type = type; | ||
17 | } | ||
18 | @Override | ||
19 | public void run() { | ||
20 | if (type == QUESTION) { | ||
21 | result = MessageDialog.openQuestion(null, title, message); | ||
22 | } else if (type == ERROR) { | ||
23 | MessageDialog.openError(null, title, message); | ||
24 | } | ||
25 | } | ||
26 | } \ No newline at end of file | ||