diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:23:09 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:24:09 +0200 |
commit | c7da892cb23d50d4d85746c9a0b6b14bf570989d (patch) | |
tree | e7136073f386d6156f51766c498c52c30c8df85f /plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/DialogRunnable.java | |
download | eclipse-poky-kepler-c7da892cb23d50d4d85746c9a0b6b14bf570989d.tar.gz |
initial commit for Enea Linux 4.0daisy
Migrated from the internal git server on the daisy-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 | ||