Last change
on this file since 191 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.
|
File size:
1.5 KB
|
Rev | Line | |
---|
[1] | 1 | package de.ugoe.cs.eventbench;
|
---|
| 2 |
|
---|
[188] | 3 | import de.ugoe.cs.eventbench.swt.MainWindow;
|
---|
[1] | 4 | import de.ugoe.cs.util.console.CommandExecuter;
|
---|
[171] | 5 | import de.ugoe.cs.util.console.Console;
|
---|
[1] | 6 | import de.ugoe.cs.util.console.TextConsole;
|
---|
| 7 |
|
---|
[171] | 8 | /**
|
---|
| 9 | * <p>
|
---|
| 10 | * Start-up class of the application.
|
---|
| 11 | * </p>
|
---|
| 12 | * <p>
|
---|
| 13 | * It sets up and starts the {@link Console}.
|
---|
| 14 | * </p>
|
---|
| 15 | *
|
---|
| 16 | * @author Steffen Herbold
|
---|
| 17 | * @version 1.0
|
---|
| 18 | */
|
---|
[1] | 19 | public class Runner {
|
---|
| 20 |
|
---|
| 21 | /**
|
---|
[171] | 22 | * <p>
|
---|
| 23 | * Main method of the application.
|
---|
| 24 | * </p>
|
---|
| 25 | *
|
---|
[1] | 26 | * @param args
|
---|
[171] | 27 | * if parameters are defined, they are interpreted as commands
|
---|
| 28 | * for the {@link Console} and executed before the user can use
|
---|
| 29 | * the console; can be used to perform batch operations
|
---|
[1] | 30 | */
|
---|
| 31 | public static void main(String[] args) {
|
---|
[171] | 32 | CommandExecuter.getInstance().addCommandPackage(
|
---|
| 33 | "de.ugoe.cs.eventbench.commands");
|
---|
| 34 | CommandExecuter.getInstance().addCommandPackage(
|
---|
| 35 | "de.ugoe.cs.eventbench.windows.commands");
|
---|
| 36 | CommandExecuter.getInstance().addCommandPackage(
|
---|
| 37 | "de.ugoe.cs.eventbench.web.commands");
|
---|
[1] | 38 | TextConsole textConsole = new TextConsole();
|
---|
[188] | 39 | boolean swtGuiRunning = false;
|
---|
[171] | 40 | if (args.length >= 1) {
|
---|
[188] | 41 | if( args[0].equals("-swt") ) {
|
---|
| 42 | MainWindow mainWindow = new MainWindow();
|
---|
| 43 | mainWindow.open();
|
---|
| 44 | swtGuiRunning = true;
|
---|
| 45 | } else {
|
---|
| 46 | for (String command : args) {
|
---|
| 47 | CommandExecuter.getInstance().exec(command);
|
---|
| 48 | }
|
---|
[112] | 49 | }
|
---|
| 50 | }
|
---|
[188] | 51 | if( !swtGuiRunning ) {
|
---|
| 52 | textConsole.run(true);
|
---|
| 53 | }
|
---|
[1] | 54 | }
|
---|
| 55 |
|
---|
| 56 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.