Last change
on this file since 189 was
188,
checked in by sherbold, 13 years ago
|
Added a first prototype of a GUI for the application. The GUI is still incomplete, many functions are not yet implemented. The GUI is based on SWT. It has only been tested on Windows 7, 32 Bit; the SWT-jar-files are from Eclipse 3.7 32 bit Windows and may not be sufficient for other operating systems.
|
-
Property svn:mime-type set to
text/plain
|
File size:
840 bytes
|
Line | |
---|
1 | package de.ugoe.cs.eventbench.swt;
|
---|
2 |
|
---|
3 | import org.eclipse.swt.widgets.Text;
|
---|
4 |
|
---|
5 | import de.ugoe.cs.util.console.Console;
|
---|
6 | import de.ugoe.cs.util.console.ConsoleObserver;
|
---|
7 |
|
---|
8 | public class SWTConsole implements ConsoleObserver {
|
---|
9 |
|
---|
10 | Text output;
|
---|
11 |
|
---|
12 | public SWTConsole(Text output) {
|
---|
13 | Console.getInstance().registerObserver(this);
|
---|
14 | this.output = output;
|
---|
15 | }
|
---|
16 |
|
---|
17 | @Override
|
---|
18 | public void updateText(String newMessage) {
|
---|
19 | output.append(newMessage);
|
---|
20 | }
|
---|
21 |
|
---|
22 | @Override
|
---|
23 | public void errStream(String errMessage) {
|
---|
24 | output.append(errMessage);
|
---|
25 |
|
---|
26 | }
|
---|
27 |
|
---|
28 | @Override
|
---|
29 | public void trace(String traceMessage) {
|
---|
30 | output.append(traceMessage);
|
---|
31 | }
|
---|
32 |
|
---|
33 | @Override
|
---|
34 | public void printStacktrace(Exception e) {
|
---|
35 | // TODO print stacktrace
|
---|
36 | }
|
---|
37 |
|
---|
38 | @Override
|
---|
39 | public void commandNotification(String command) {
|
---|
40 | output.append("> " + command);
|
---|
41 | }
|
---|
42 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.