1 |
mojays |
2 |
package appl.parallel.starter.client; |
2 |
|
|
|
3 |
|
|
import java.awt.event.WindowAdapter; |
4 |
|
|
import java.awt.event.WindowEvent; |
5 |
|
|
|
6 |
|
|
import javax.swing.JFrame; |
7 |
|
|
|
8 |
|
|
import org.apache.log4j.BasicConfigurator; |
9 |
|
|
|
10 |
|
|
import appl.parallel.starter.Starter; |
11 |
|
|
|
12 |
|
|
/** |
13 |
|
|
* This is a GUI for controlling the {@link Starter Starters} in the network. |
14 |
|
|
* It has options to start/stop and restart selected servers. |
15 |
|
|
* @author Dominik Appl |
16 |
|
|
* |
17 |
|
|
*/ |
18 |
|
|
public class StarterClientGUI extends JFrame { |
19 |
|
|
/** |
20 |
|
|
* Creates a new GUI |
21 |
|
|
*/ |
22 |
|
|
public StarterClientGUI() { |
23 |
|
|
super("Server starter"); |
24 |
|
|
this.getContentPane().add(new XuluStarterController().getPanel()); |
25 |
|
|
this.setSize(300, 400); |
26 |
|
|
this.addWindowListener(new ExitListener()); |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
/** |
30 |
|
|
* @param args no arguments interpreted |
31 |
|
|
*/ |
32 |
|
|
public static void main(String[] args) { |
33 |
|
|
BasicConfigurator.configure(); |
34 |
|
|
StarterClientGUI clientGUI = new StarterClientGUI(); |
35 |
|
|
clientGUI.setVisible(true); |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
/** |
39 |
|
|
* Shuts down the application on exit |
40 |
|
|
* |
41 |
|
|
* @author Dominik Appl |
42 |
|
|
*/ |
43 |
|
|
public class ExitListener extends WindowAdapter { |
44 |
|
|
public void windowClosing(WindowEvent event) { |
45 |
|
|
System.exit(0); |
46 |
|
|
} |
47 |
|
|
} |
48 |
|
|
} |