diff options
| author | tspitzer | 2013-10-10 10:21:17 +0200 |
|---|---|---|
| committer | tspitzer | 2013-10-10 10:21:17 +0200 |
| commit | dedd4f1036f851651ae2cf547329bf3a380c7d98 (patch) | |
| tree | 7e705908885623a866462eda0a25d603c0326916 | |
| parent | saddsa (diff) | |
| download | tutor-module-dedd4f1036f851651ae2cf547329bf3a380c7d98.tar.gz tutor-module-dedd4f1036f851651ae2cf547329bf3a380c7d98.tar.xz tutor-module-dedd4f1036f851651ae2cf547329bf3a380c7d98.zip | |
Die Anwendung wird nun korrekt beendet.
Bei Schließen der Upload- und Downloadfenster wird der jeweilige Vorgang
nun abgebrochen.
62 files changed, 128 insertions, 7 deletions
diff --git a/Dozentenmodul/bin/GUI/ActionChooser$1.class b/Dozentenmodul/bin/GUI/ActionChooser$1.class Binary files differindex 2de4e64d..ae8ac000 100644 --- a/Dozentenmodul/bin/GUI/ActionChooser$1.class +++ b/Dozentenmodul/bin/GUI/ActionChooser$1.class diff --git a/Dozentenmodul/bin/GUI/ActionChooser.class b/Dozentenmodul/bin/GUI/ActionChooser.class Binary files differindex d66d950b..d6005412 100644 --- a/Dozentenmodul/bin/GUI/ActionChooser.class +++ b/Dozentenmodul/bin/GUI/ActionChooser.class diff --git a/Dozentenmodul/bin/GUI/AddOS$1.class b/Dozentenmodul/bin/GUI/AddOS$1.class Binary files differindex e7863e77..ff61a4fe 100644 --- a/Dozentenmodul/bin/GUI/AddOS$1.class +++ b/Dozentenmodul/bin/GUI/AddOS$1.class diff --git a/Dozentenmodul/bin/GUI/AddOS$2.class b/Dozentenmodul/bin/GUI/AddOS$2.class Binary files differindex 08fffc2a..a49cce17 100644 --- a/Dozentenmodul/bin/GUI/AddOS$2.class +++ b/Dozentenmodul/bin/GUI/AddOS$2.class diff --git a/Dozentenmodul/bin/GUI/AddOS.class b/Dozentenmodul/bin/GUI/AddOS.class Binary files differindex a2e9dc07..59769675 100644 --- a/Dozentenmodul/bin/GUI/AddOS.class +++ b/Dozentenmodul/bin/GUI/AddOS.class diff --git a/Dozentenmodul/bin/GUI/AddSoftware$1.class b/Dozentenmodul/bin/GUI/AddSoftware$1.class Binary files differindex cd6f0364..57ec2052 100644 --- a/Dozentenmodul/bin/GUI/AddSoftware$1.class +++ b/Dozentenmodul/bin/GUI/AddSoftware$1.class diff --git a/Dozentenmodul/bin/GUI/AddSoftware$2.class b/Dozentenmodul/bin/GUI/AddSoftware$2.class Binary files differindex a4b65d07..cd5e1b1b 100644 --- a/Dozentenmodul/bin/GUI/AddSoftware$2.class +++ b/Dozentenmodul/bin/GUI/AddSoftware$2.class diff --git a/Dozentenmodul/bin/GUI/AddSoftware.class b/Dozentenmodul/bin/GUI/AddSoftware.class Binary files differindex f83d17ed..1bc0f622 100644 --- a/Dozentenmodul/bin/GUI/AddSoftware.class +++ b/Dozentenmodul/bin/GUI/AddSoftware.class diff --git a/Dozentenmodul/bin/GUI/EingabeAllgemein$1.class b/Dozentenmodul/bin/GUI/EingabeAllgemein$1.class Binary files differindex 093ded3e..cd71f508 100644 --- a/Dozentenmodul/bin/GUI/EingabeAllgemein$1.class +++ b/Dozentenmodul/bin/GUI/EingabeAllgemein$1.class diff --git a/Dozentenmodul/bin/GUI/EingabeAllgemein$2.class b/Dozentenmodul/bin/GUI/EingabeAllgemein$2.class Binary files differindex eb28c3e5..8c1d6ddc 100644 --- a/Dozentenmodul/bin/GUI/EingabeAllgemein$2.class +++ b/Dozentenmodul/bin/GUI/EingabeAllgemein$2.class diff --git a/Dozentenmodul/bin/GUI/EingabeAllgemein$3.class b/Dozentenmodul/bin/GUI/EingabeAllgemein$3.class Binary files differindex 2eda45b5..7774523d 100644 --- a/Dozentenmodul/bin/GUI/EingabeAllgemein$3.class +++ b/Dozentenmodul/bin/GUI/EingabeAllgemein$3.class diff --git a/Dozentenmodul/bin/GUI/EingabeAllgemein.class b/Dozentenmodul/bin/GUI/EingabeAllgemein.class Binary files differindex ecccf72b..9a9ba023 100644 --- a/Dozentenmodul/bin/GUI/EingabeAllgemein.class +++ b/Dozentenmodul/bin/GUI/EingabeAllgemein.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$1.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$1.class Binary files differindex bb4d27bd..9743871a 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$1.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$1.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$2.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$2.class Binary files differindex b6081a84..097b72e1 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$2.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$2.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$3.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$3.class Binary files differindex 49b19a06..97a8ff3a 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$3.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$3.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$4.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$4.class Binary files differindex 68d1c42c..0e01b224 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$4.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$4.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$5.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$5.class Binary files differindex 9ba6619a..e433d998 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$5.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$5.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$6.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$6.class Binary files differindex 25b1a704..660aa33e 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$6.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten$6.class diff --git a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten.class b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten.class Binary files differindex 77e6b60f..c848ef14 100644 --- a/Dozentenmodul/bin/GUI/EingabeSoftwareDaten.class +++ b/Dozentenmodul/bin/GUI/EingabeSoftwareDaten.class diff --git a/Dozentenmodul/bin/GUI/EingabeSystemDaten$1.class b/Dozentenmodul/bin/GUI/EingabeSystemDaten$1.class Binary files differindex 0d82d498..da26975c 100644 --- a/Dozentenmodul/bin/GUI/EingabeSystemDaten$1.class +++ b/Dozentenmodul/bin/GUI/EingabeSystemDaten$1.class diff --git a/Dozentenmodul/bin/GUI/EingabeSystemDaten$2.class b/Dozentenmodul/bin/GUI/EingabeSystemDaten$2.class Binary files differindex e1c316f9..8798d1f5 100644 --- a/Dozentenmodul/bin/GUI/EingabeSystemDaten$2.class +++ b/Dozentenmodul/bin/GUI/EingabeSystemDaten$2.class diff --git a/Dozentenmodul/bin/GUI/EingabeSystemDaten$3.class b/Dozentenmodul/bin/GUI/EingabeSystemDaten$3.class Binary files differindex 9f289a12..5905324d 100644 --- a/Dozentenmodul/bin/GUI/EingabeSystemDaten$3.class +++ b/Dozentenmodul/bin/GUI/EingabeSystemDaten$3.class diff --git a/Dozentenmodul/bin/GUI/EingabeSystemDaten.class b/Dozentenmodul/bin/GUI/EingabeSystemDaten.class Binary files differindex 452b9830..bf9dba78 100644 --- a/Dozentenmodul/bin/GUI/EingabeSystemDaten.class +++ b/Dozentenmodul/bin/GUI/EingabeSystemDaten.class diff --git a/Dozentenmodul/bin/GUI/FTPDownloader$1.class b/Dozentenmodul/bin/GUI/FTPDownloader$1.class Binary files differindex 32f60669..c8018a4f 100644 --- a/Dozentenmodul/bin/GUI/FTPDownloader$1.class +++ b/Dozentenmodul/bin/GUI/FTPDownloader$1.class diff --git a/Dozentenmodul/bin/GUI/FTPDownloader$2.class b/Dozentenmodul/bin/GUI/FTPDownloader$2.class Binary files differindex eacd73ae..86cae62c 100644 --- a/Dozentenmodul/bin/GUI/FTPDownloader$2.class +++ b/Dozentenmodul/bin/GUI/FTPDownloader$2.class diff --git a/Dozentenmodul/bin/GUI/FTPDownloader.class b/Dozentenmodul/bin/GUI/FTPDownloader.class Binary files differindex b4fe4e74..d07f433f 100644 --- a/Dozentenmodul/bin/GUI/FTPDownloader.class +++ b/Dozentenmodul/bin/GUI/FTPDownloader.class diff --git a/Dozentenmodul/bin/GUI/FTPUploader$1.class b/Dozentenmodul/bin/GUI/FTPUploader$1.class Binary files differindex e9520bc4..b0164170 100644 --- a/Dozentenmodul/bin/GUI/FTPUploader$1.class +++ b/Dozentenmodul/bin/GUI/FTPUploader$1.class diff --git a/Dozentenmodul/bin/GUI/FTPUploader$2.class b/Dozentenmodul/bin/GUI/FTPUploader$2.class Binary files differindex d47e8884..326a58ab 100644 --- a/Dozentenmodul/bin/GUI/FTPUploader$2.class +++ b/Dozentenmodul/bin/GUI/FTPUploader$2.class diff --git a/Dozentenmodul/bin/GUI/FTPUploader$3.class b/Dozentenmodul/bin/GUI/FTPUploader$3.class Binary files differindex 139d0e46..bd69ae71 100644 --- a/Dozentenmodul/bin/GUI/FTPUploader$3.class +++ b/Dozentenmodul/bin/GUI/FTPUploader$3.class diff --git a/Dozentenmodul/bin/GUI/FTPUploader.class b/Dozentenmodul/bin/GUI/FTPUploader.class Binary files differindex 940f3f2f..a09c94e1 100644 --- a/Dozentenmodul/bin/GUI/FTPUploader.class +++ b/Dozentenmodul/bin/GUI/FTPUploader.class diff --git a/Dozentenmodul/bin/GUI/FertigStellen$1.class b/Dozentenmodul/bin/GUI/FertigStellen$1.class Binary files differindex ba2aaae5..e202f467 100644 --- a/Dozentenmodul/bin/GUI/FertigStellen$1.class +++ b/Dozentenmodul/bin/GUI/FertigStellen$1.class diff --git a/Dozentenmodul/bin/GUI/FertigStellen$2.class b/Dozentenmodul/bin/GUI/FertigStellen$2.class Binary files differindex 52f251b1..230bd76d 100644 --- a/Dozentenmodul/bin/GUI/FertigStellen$2.class +++ b/Dozentenmodul/bin/GUI/FertigStellen$2.class diff --git a/Dozentenmodul/bin/GUI/FertigStellen$3.class b/Dozentenmodul/bin/GUI/FertigStellen$3.class Binary files differindex 363e7e4d..a4f8a8a8 100644 --- a/Dozentenmodul/bin/GUI/FertigStellen$3.class +++ b/Dozentenmodul/bin/GUI/FertigStellen$3.class diff --git a/Dozentenmodul/bin/GUI/FertigStellen.class b/Dozentenmodul/bin/GUI/FertigStellen.class Binary files differindex 2e10a932..5d3442ef 100644 --- a/Dozentenmodul/bin/GUI/FertigStellen.class +++ b/Dozentenmodul/bin/GUI/FertigStellen.class diff --git a/Dozentenmodul/bin/GUI/LoginWindow$1.class b/Dozentenmodul/bin/GUI/LoginWindow$1.class Binary files differindex 0221e712..47df6ecc 100644 --- a/Dozentenmodul/bin/GUI/LoginWindow$1.class +++ b/Dozentenmodul/bin/GUI/LoginWindow$1.class diff --git a/Dozentenmodul/bin/GUI/LoginWindow$2.class b/Dozentenmodul/bin/GUI/LoginWindow$2.class Binary files differindex 33142bef..719c8bfb 100644 --- a/Dozentenmodul/bin/GUI/LoginWindow$2.class +++ b/Dozentenmodul/bin/GUI/LoginWindow$2.class diff --git a/Dozentenmodul/bin/GUI/LoginWindow.class b/Dozentenmodul/bin/GUI/LoginWindow.class Binary files differindex a4fc3451..0d8610a0 100644 --- a/Dozentenmodul/bin/GUI/LoginWindow.class +++ b/Dozentenmodul/bin/GUI/LoginWindow.class diff --git a/Dozentenmodul/bin/GUI/getVMwarePlayer$1.class b/Dozentenmodul/bin/GUI/getVMwarePlayer$1.class Binary files differindex 1aa61afd..3d2f2b19 100644 --- a/Dozentenmodul/bin/GUI/getVMwarePlayer$1.class +++ b/Dozentenmodul/bin/GUI/getVMwarePlayer$1.class diff --git a/Dozentenmodul/bin/GUI/getVMwarePlayer$2.class b/Dozentenmodul/bin/GUI/getVMwarePlayer$2.class Binary files differindex eb68bd90..c3d25a29 100644 --- a/Dozentenmodul/bin/GUI/getVMwarePlayer$2.class +++ b/Dozentenmodul/bin/GUI/getVMwarePlayer$2.class diff --git a/Dozentenmodul/bin/GUI/getVMwarePlayer.class b/Dozentenmodul/bin/GUI/getVMwarePlayer.class Binary files differindex 80526159..4f4a4599 100644 --- a/Dozentenmodul/bin/GUI/getVMwarePlayer.class +++ b/Dozentenmodul/bin/GUI/getVMwarePlayer.class diff --git a/Dozentenmodul/bin/GUI/searchRohling$1.class b/Dozentenmodul/bin/GUI/searchRohling$1.class Binary files differindex a1714dc7..ebc53a07 100644 --- a/Dozentenmodul/bin/GUI/searchRohling$1.class +++ b/Dozentenmodul/bin/GUI/searchRohling$1.class diff --git a/Dozentenmodul/bin/GUI/searchRohling$2.class b/Dozentenmodul/bin/GUI/searchRohling$2.class Binary files differindex e68ee39d..79efebc6 100644 --- a/Dozentenmodul/bin/GUI/searchRohling$2.class +++ b/Dozentenmodul/bin/GUI/searchRohling$2.class diff --git a/Dozentenmodul/bin/GUI/searchRohling$3.class b/Dozentenmodul/bin/GUI/searchRohling$3.class Binary files differindex 82421ed6..7d8a1a51 100644 --- a/Dozentenmodul/bin/GUI/searchRohling$3.class +++ b/Dozentenmodul/bin/GUI/searchRohling$3.class diff --git a/Dozentenmodul/bin/GUI/searchRohling$4.class b/Dozentenmodul/bin/GUI/searchRohling$4.class Binary files differindex 83f5ab86..a4d31c72 100644 --- a/Dozentenmodul/bin/GUI/searchRohling$4.class +++ b/Dozentenmodul/bin/GUI/searchRohling$4.class diff --git a/Dozentenmodul/bin/GUI/searchRohling.class b/Dozentenmodul/bin/GUI/searchRohling.class Binary files differindex 97be8e6c..30dc2cf4 100644 --- a/Dozentenmodul/bin/GUI/searchRohling.class +++ b/Dozentenmodul/bin/GUI/searchRohling.class diff --git a/Dozentenmodul/bin/downloader/DownloadTask.class b/Dozentenmodul/bin/downloader/DownloadTask.class Binary files differindex acc82562..98b8dbe8 100644 --- a/Dozentenmodul/bin/downloader/DownloadTask.class +++ b/Dozentenmodul/bin/downloader/DownloadTask.class diff --git a/Dozentenmodul/bin/downloader/UploadTask.class b/Dozentenmodul/bin/downloader/UploadTask.class Binary files differindex 3ea6ee6a..bfc073b7 100644 --- a/Dozentenmodul/bin/downloader/UploadTask.class +++ b/Dozentenmodul/bin/downloader/UploadTask.class diff --git a/Dozentenmodul/src/GUI/ActionChooser.java b/Dozentenmodul/src/GUI/ActionChooser.java index 71f1be92..7e65b673 100644 --- a/Dozentenmodul/src/GUI/ActionChooser.java +++ b/Dozentenmodul/src/GUI/ActionChooser.java @@ -21,6 +21,8 @@ import javax.swing.ButtonGroup; import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class ActionChooser extends JDialog {
@@ -36,7 +38,7 @@ public class ActionChooser extends JDialog { public static void main(String[] args) {
try {
ActionChooser dialog = new ActionChooser();
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
dialog.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
@@ -47,6 +49,12 @@ public class ActionChooser extends JDialog { * Create the dialog.
*/
public ActionChooser() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
diff --git a/Dozentenmodul/src/GUI/AddOS.java b/Dozentenmodul/src/GUI/AddOS.java index 045031bd..0572b18c 100644 --- a/Dozentenmodul/src/GUI/AddOS.java +++ b/Dozentenmodul/src/GUI/AddOS.java @@ -46,6 +46,7 @@ public class AddOS extends JDialog { */
@SuppressWarnings({ "rawtypes", "unchecked" })
public AddOS() {
+ setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setTitle("Dozentenmodul");
setBounds(100, 100, 288, 300);
getContentPane().setLayout(new BorderLayout());
diff --git a/Dozentenmodul/src/GUI/AddSoftware.java b/Dozentenmodul/src/GUI/AddSoftware.java index c04c5012..4f9f2334 100644 --- a/Dozentenmodul/src/GUI/AddSoftware.java +++ b/Dozentenmodul/src/GUI/AddSoftware.java @@ -46,6 +46,7 @@ public class AddSoftware extends JDialog { */
@SuppressWarnings({ "rawtypes", "unchecked" })
public AddSoftware() {
+ setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setTitle("Dozentenmodul");
setBounds(100, 100, 288, 300);
getContentPane().setLayout(new BorderLayout());
diff --git a/Dozentenmodul/src/GUI/EingabeAllgemein.java b/Dozentenmodul/src/GUI/EingabeAllgemein.java index 4643332e..e1811e95 100644 --- a/Dozentenmodul/src/GUI/EingabeAllgemein.java +++ b/Dozentenmodul/src/GUI/EingabeAllgemein.java @@ -26,6 +26,8 @@ import javax.swing.JMenu; import javax.swing.JMenuItem;
import Models.person;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class EingabeAllgemein extends JDialog {
@@ -62,6 +64,12 @@ public class EingabeAllgemein extends JDialog { * Create the dialog.
*/
public EingabeAllgemein() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ System.exit(0);
+ }
+ });
setResizable(false);
try {
diff --git a/Dozentenmodul/src/GUI/EingabeSoftwareDaten.java b/Dozentenmodul/src/GUI/EingabeSoftwareDaten.java index 90b6fb6f..2b2d988d 100644 --- a/Dozentenmodul/src/GUI/EingabeSoftwareDaten.java +++ b/Dozentenmodul/src/GUI/EingabeSoftwareDaten.java @@ -29,6 +29,8 @@ import javax.swing.JMenuBar; import javax.swing.JMenu;
import javax.swing.JMenuItem;
import Models.vm;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
@@ -59,6 +61,12 @@ public class EingabeSoftwareDaten extends JDialog { */
@SuppressWarnings({ })
public EingabeSoftwareDaten() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
diff --git a/Dozentenmodul/src/GUI/EingabeSystemDaten.java b/Dozentenmodul/src/GUI/EingabeSystemDaten.java index 4a70d4b3..81071323 100644 --- a/Dozentenmodul/src/GUI/EingabeSystemDaten.java +++ b/Dozentenmodul/src/GUI/EingabeSystemDaten.java @@ -31,6 +31,12 @@ import javax.swing.JMenuBar; import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JScrollPane;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class EingabeSystemDaten extends JDialog {
@@ -62,6 +68,12 @@ public class EingabeSystemDaten extends JDialog { * Create the dialog.
*/
public EingabeSystemDaten() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
@@ -129,6 +141,10 @@ public class EingabeSystemDaten extends JDialog { contentPanel.add(lblBetriebssystem);
choiceOS = new Choice();
+
+
+
+
choiceOS.setBounds(170, 373, 150, 20);
@@ -183,16 +199,19 @@ public class EingabeSystemDaten extends JDialog { btnHinzufgen.setBounds(326, 372, 118, 23);
contentPanel.add(btnHinzufgen);
shortDesc=new JTextArea();
+ shortDesc.setFont(new Font("Tahoma", Font.PLAIN, 11));
shortDesc.setText(vm.vl.getShortDesc());
JScrollPane scrollPane = new JScrollPane(shortDesc);
scrollPane.setBounds(170, 67, 274, 63);
contentPanel.add(scrollPane);
longDesc=new JTextArea();
+ longDesc.setFont(new Font("Tahoma", Font.PLAIN, 11));
longDesc.setText(vm.vl.getLongDesc());
JScrollPane scrollPane_1 = new JScrollPane(longDesc);
scrollPane_1.setBounds(170, 139, 274, 158);
contentPanel.add(scrollPane_1);
comment=new JTextArea();
+ comment.setFont(new Font("Tahoma", Font.PLAIN, 11));
comment.setText(vm.vl.getComment());
JScrollPane scrollPane_2 = new JScrollPane(comment);
scrollPane_2.setBounds(170, 308, 274, 59);
diff --git a/Dozentenmodul/src/GUI/FTPDownloader.java b/Dozentenmodul/src/GUI/FTPDownloader.java index 5f062ff0..4e676ace 100644 --- a/Dozentenmodul/src/GUI/FTPDownloader.java +++ b/Dozentenmodul/src/GUI/FTPDownloader.java @@ -34,6 +34,8 @@ import java.awt.event.ActionListener; import java.awt.event.ActionEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class FTPDownloader extends JFrame implements PropertyChangeListener {
@@ -51,6 +53,7 @@ public class FTPDownloader extends JFrame implements PropertyChangeListener { String downloadPath="";
String filename="";
static String arg="";
+ DownloadTask task;
/**
* Launch the application.
*/
@@ -71,6 +74,15 @@ public class FTPDownloader extends JFrame implements PropertyChangeListener { * Create the frame.
*/
public FTPDownloader(String name) {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+
+ task.cancel(true);
+ dispose();
+ }
+ });
+ setResizable(false);
//setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
filename=name;
@@ -141,17 +153,29 @@ public class FTPDownloader extends JFrame implements PropertyChangeListener { contentPanel.add(downspeed);
{
JPanel buttonPane = new JPanel();
- buttonPane.setBackground(Color.WHITE);
+ buttonPane.setBackground(UIManager.getColor("Button.background"));
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
JButton okButton = new JButton("OK");
+ okButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ dispose();
+ }
+ });
okButton.setActionCommand("OK");
buttonPane.add(okButton);
getRootPane().setDefaultButton(okButton);
}
{
JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+
+ task.cancel(true);
+ dispose();
+ }
+ });
cancelButton.setActionCommand("Cancel");
buttonPane.add(cancelButton);
}
@@ -163,9 +187,10 @@ public class FTPDownloader extends JFrame implements PropertyChangeListener { private void buttonDownloadActionPerformed(ActionEvent event) {
progressBar.setValue(0);
- DownloadTask task = new DownloadTask(host, port, username, password,downloadPath+filename, lblNewLabel.getText(), this);
+ task = new DownloadTask(host, port, username, password,downloadPath+filename, lblNewLabel.getText(), this);
task.addPropertyChangeListener(this);
task.execute();
+
}
diff --git a/Dozentenmodul/src/GUI/FTPUploader.java b/Dozentenmodul/src/GUI/FTPUploader.java index 97a6eccb..ee72e7f7 100644 --- a/Dozentenmodul/src/GUI/FTPUploader.java +++ b/Dozentenmodul/src/GUI/FTPUploader.java @@ -31,6 +31,8 @@ import java.awt.event.ActionListener; import java.awt.event.ActionEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class FTPUploader extends JFrame implements PropertyChangeListener {
@@ -49,6 +51,7 @@ public class FTPUploader extends JFrame implements PropertyChangeListener { String filename="";
File uploadFile;
static String arg="";
+ UploadTask task;
/**
* Launch the application.
*/
@@ -69,6 +72,13 @@ public class FTPUploader extends JFrame implements PropertyChangeListener { * Create the frame.
*/
public FTPUploader() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ task.cancel(true);
+ }
+ });
+ setResizable(false);
//setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
@@ -143,7 +153,7 @@ public class FTPUploader extends JFrame implements PropertyChangeListener { contentPanel.add(UpSpeed);
{
JPanel buttonPane = new JPanel();
- buttonPane.setBackground(Color.WHITE);
+ buttonPane.setBackground(UIManager.getColor("Button.background"));
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
@@ -161,6 +171,7 @@ public class FTPUploader extends JFrame implements PropertyChangeListener { JButton cancelButton = new JButton("Zur\u00FCck");
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
+ task.cancel(true);
dispose();
}
});
@@ -178,7 +189,7 @@ public class FTPUploader extends JFrame implements PropertyChangeListener { //if(nextStep==true)
//{
progressBar.setValue(0);
- UploadTask task=new UploadTask(host,port,username,password,uploadPath, uploadFile);
+ task=new UploadTask(host,port,username,password,uploadPath, uploadFile);
task.addPropertyChangeListener(this);
task.execute();
diff --git a/Dozentenmodul/src/GUI/FertigStellen.java b/Dozentenmodul/src/GUI/FertigStellen.java index 1d9734c4..4dfc92cf 100644 --- a/Dozentenmodul/src/GUI/FertigStellen.java +++ b/Dozentenmodul/src/GUI/FertigStellen.java @@ -23,6 +23,8 @@ import Models.person; import Models.vm;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class FertigStellen extends JDialog {
@@ -48,6 +50,12 @@ public class FertigStellen extends JDialog { */
@SuppressWarnings("deprecation")
public FertigStellen() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
diff --git a/Dozentenmodul/src/GUI/LoginWindow.java b/Dozentenmodul/src/GUI/LoginWindow.java index 3b292e42..19691eb2 100644 --- a/Dozentenmodul/src/GUI/LoginWindow.java +++ b/Dozentenmodul/src/GUI/LoginWindow.java @@ -17,6 +17,8 @@ import java.awt.event.ActionListener; import java.awt.event.ActionEvent;
import javax.swing.JPasswordField;
import java.awt.Color;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class LoginWindow extends JFrame {
@@ -46,6 +48,12 @@ public class LoginWindow extends JFrame { * Create the frame.
*/
public LoginWindow() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
//Fenster darf nicht vergrößert werden
setResizable(false);
diff --git a/Dozentenmodul/src/GUI/Summary.java b/Dozentenmodul/src/GUI/Summary.java index 471f32f9..db3772cf 100644 --- a/Dozentenmodul/src/GUI/Summary.java +++ b/Dozentenmodul/src/GUI/Summary.java @@ -25,6 +25,8 @@ import javax.swing.JScrollPane; import javax.swing.JTabbedPane;
import java.awt.Panel;
import java.text.SimpleDateFormat;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
@@ -48,6 +50,12 @@ public class Summary extends JDialog { * Create the dialog.
*/
public Summary() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
diff --git a/Dozentenmodul/src/GUI/getVMwarePlayer.java b/Dozentenmodul/src/GUI/getVMwarePlayer.java index 919df825..5709639d 100644 --- a/Dozentenmodul/src/GUI/getVMwarePlayer.java +++ b/Dozentenmodul/src/GUI/getVMwarePlayer.java @@ -24,6 +24,8 @@ import java.awt.event.MouseEvent; import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
@@ -48,6 +50,12 @@ public class getVMwarePlayer extends JDialog { * Create the dialog.
*/
public getVMwarePlayer() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
diff --git a/Dozentenmodul/src/GUI/searchRohling.java b/Dozentenmodul/src/GUI/searchRohling.java index d4bc1c47..979bc5d2 100644 --- a/Dozentenmodul/src/GUI/searchRohling.java +++ b/Dozentenmodul/src/GUI/searchRohling.java @@ -26,6 +26,8 @@ import javax.swing.JMenuItem; import downloader.FTPException;
import downloader.FTPUtility;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class searchRohling extends JDialog {
@@ -56,6 +58,12 @@ public class searchRohling extends JDialog { * Create the dialog.
*/
public searchRohling() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
diff --git a/Dozentenmodul/src/downloader/DownloadTask.java b/Dozentenmodul/src/downloader/DownloadTask.java index bec366bc..e01aa2c1 100644 --- a/Dozentenmodul/src/downloader/DownloadTask.java +++ b/Dozentenmodul/src/downloader/DownloadTask.java @@ -68,7 +68,7 @@ public class DownloadTask extends SwingWorker<Void, Void> { util.downloadFile(downloadPath);
InputStream inputStream = util.getInputStream();
- while ((bytesRead = inputStream.read(buffer)) != -1) {
+ while ((bytesRead = inputStream.read(buffer)) != -1 && isCancelled()==false) {
outputStream.write(buffer, 0, bytesRead);
totalBytesRead += bytesRead;
//System.out.println(totalBytesRead);
diff --git a/Dozentenmodul/src/downloader/UploadTask.java b/Dozentenmodul/src/downloader/UploadTask.java index 691a31bb..5e5f94d0 100644 --- a/Dozentenmodul/src/downloader/UploadTask.java +++ b/Dozentenmodul/src/downloader/UploadTask.java @@ -52,7 +52,7 @@ public class UploadTask extends SwingWorker<Void, Void> { long start=System.nanoTime();
final double NANOS_PER_SECOND = 1000000000.0;
final double BYTES_PER_MIB = 1024*1024;
- while ((bytesRead = inputStream.read(buffer)) != -1) {
+ while ((bytesRead = inputStream.read(buffer)) != -1 && isCancelled()==false) {
util.writeFileBytes(buffer, 0, bytesRead);
totalBytesRead += bytesRead;
percentCompleted = (int) (totalBytesRead * 100 / fileSize);
|
