summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul
diff options
context:
space:
mode:
authorunknown2014-04-01 14:38:05 +0200
committerunknown2014-04-01 14:38:05 +0200
commitae38be79175560a3617fa4da0e213cd7728eb228 (patch)
tree63436b6f597fe8dec3a3adde8c828233d2a2f650 /Dozentenmodul
parentUnterschiedliche kleine und größere Änderungen (diff)
downloadtutor-module-ae38be79175560a3617fa4da0e213cd7728eb228.tar.gz
tutor-module-ae38be79175560a3617fa4da0e213cd7728eb228.tar.xz
tutor-module-ae38be79175560a3617fa4da0e213cd7728eb228.zip
Uploader angepasst, Thrift connection mit system.out.println versehen
Diffstat (limited to 'Dozentenmodul')
-rw-r--r--Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.classbin1292 -> 1292 bytes
-rw-r--r--Dozentenmodul/bin/GUI/FTPDownloader_GUI.classbin9098 -> 9504 bytes
-rw-r--r--Dozentenmodul/bin/GUI/Login_GUI$1.classbin1082 -> 1082 bytes
-rw-r--r--Dozentenmodul/bin/GUI/Login_GUI$2.classbin635 -> 635 bytes
-rw-r--r--Dozentenmodul/bin/GUI/Login_GUI$3.classbin647 -> 647 bytes
-rw-r--r--Dozentenmodul/bin/GUI/Login_GUI.classbin7734 -> 7734 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPDownloader_GUI$1.classbin1266 -> 1266 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPDownloader_GUI$2.classbin1211 -> 1211 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPDownloader_GUI$3.classbin778 -> 778 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPDownloader_GUI$4.classbin1292 -> 1292 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPDownloader_GUI$5.classbin0 -> 834 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPDownloader_GUI.classbin9098 -> 9504 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.classbin758 -> 758 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.classbin1217 -> 1217 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.classbin1336 -> 1336 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.classbin763 -> 763 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.classbin1473 -> 1473 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.classbin1599 -> 1599 bytes
-rw-r--r--Dozentenmodul/bin/gui/FTPEditUploader_GUI.classbin10407 -> 10407 bytes
-rw-r--r--Dozentenmodul/bin/gui/Login_GUI$1.classbin1082 -> 1082 bytes
-rw-r--r--Dozentenmodul/bin/gui/Login_GUI$2.classbin635 -> 635 bytes
-rw-r--r--Dozentenmodul/bin/gui/Login_GUI$3.classbin647 -> 647 bytes
-rw-r--r--Dozentenmodul/bin/gui/Login_GUI$4.classbin647 -> 647 bytes
-rw-r--r--Dozentenmodul/bin/gui/Login_GUI$5.classbin644 -> 644 bytes
-rw-r--r--Dozentenmodul/bin/gui/Login_GUI.classbin7734 -> 7734 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$1.classbin698 -> 698 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$2.classbin1249 -> 1249 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$3.classbin766 -> 766 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$4.classbin1252 -> 1252 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$5.classbin775 -> 775 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$6.classbin1340 -> 1340 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$7.classbin855 -> 855 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$8.classbin817 -> 817 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI$9.classbin1594 -> 1594 bytes
-rw-r--r--Dozentenmodul/bin/gui/SearchEditImage_GUI.classbin11819 -> 11819 bytes
-rw-r--r--Dozentenmodul/bin/thrift/ThriftConnection.classbin1528 -> 1581 bytes
-rw-r--r--Dozentenmodul/src/GUI/FTPDownloader_GUI.java313
-rw-r--r--Dozentenmodul/src/GUI/Login_GUI.java14
-rw-r--r--Dozentenmodul/src/gui/FTPDownloader_GUI.java313
-rw-r--r--Dozentenmodul/src/gui/FTPEditUploader_GUI.java4
-rw-r--r--Dozentenmodul/src/gui/Login_GUI.java14
-rw-r--r--Dozentenmodul/src/gui/SearchEditImage_GUI.java5
-rw-r--r--Dozentenmodul/src/thrift/ThriftConnection.java1
43 files changed, 355 insertions, 309 deletions
diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class
index 235576d0..3fbd58bc 100644
--- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class
+++ b/Dozentenmodul/bin/GUI/FTPDownloader_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class b/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class
index 1098273e..89fbdc61 100644
--- a/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class
+++ b/Dozentenmodul/bin/GUI/FTPDownloader_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/GUI/Login_GUI$1.class b/Dozentenmodul/bin/GUI/Login_GUI$1.class
index b4388d57..47818348 100644
--- a/Dozentenmodul/bin/GUI/Login_GUI$1.class
+++ b/Dozentenmodul/bin/GUI/Login_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/GUI/Login_GUI$2.class b/Dozentenmodul/bin/GUI/Login_GUI$2.class
index 54cd4d69..41243cbe 100644
--- a/Dozentenmodul/bin/GUI/Login_GUI$2.class
+++ b/Dozentenmodul/bin/GUI/Login_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/GUI/Login_GUI$3.class b/Dozentenmodul/bin/GUI/Login_GUI$3.class
index 46796de6..3122e95a 100644
--- a/Dozentenmodul/bin/GUI/Login_GUI$3.class
+++ b/Dozentenmodul/bin/GUI/Login_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/GUI/Login_GUI.class b/Dozentenmodul/bin/GUI/Login_GUI.class
index 98c862f5..90a674be 100644
--- a/Dozentenmodul/bin/GUI/Login_GUI.class
+++ b/Dozentenmodul/bin/GUI/Login_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class
index 244b88e2..f8d1dc16 100644
--- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class
+++ b/Dozentenmodul/bin/gui/FTPDownloader_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class
index 42a0f970..a98b364b 100644
--- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class
+++ b/Dozentenmodul/bin/gui/FTPDownloader_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class
index 26910efa..3bffc15f 100644
--- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class
+++ b/Dozentenmodul/bin/gui/FTPDownloader_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class
index 235576d0..3fbd58bc 100644
--- a/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class
+++ b/Dozentenmodul/bin/gui/FTPDownloader_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI$5.class
new file mode 100644
index 00000000..e7013a51
--- /dev/null
+++ b/Dozentenmodul/bin/gui/FTPDownloader_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/FTPDownloader_GUI.class
index 1098273e..89fbdc61 100644
--- a/Dozentenmodul/bin/gui/FTPDownloader_GUI.class
+++ b/Dozentenmodul/bin/gui/FTPDownloader_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class
index 4312cd42..9fa18b77 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class
index 6834e2ba..c79031a8 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class
index 1614a880..dc628f0a 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class
index dbece136..7aa1908d 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class
index 4beacc01..01834329 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class
index 875eb9e8..9ebb41ee 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI$6.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class
index a1f4b67f..fc6e665a 100644
--- a/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class
+++ b/Dozentenmodul/bin/gui/FTPEditUploader_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/Login_GUI$1.class b/Dozentenmodul/bin/gui/Login_GUI$1.class
index b4388d57..47818348 100644
--- a/Dozentenmodul/bin/gui/Login_GUI$1.class
+++ b/Dozentenmodul/bin/gui/Login_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/Login_GUI$2.class b/Dozentenmodul/bin/gui/Login_GUI$2.class
index 54cd4d69..41243cbe 100644
--- a/Dozentenmodul/bin/gui/Login_GUI$2.class
+++ b/Dozentenmodul/bin/gui/Login_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/Login_GUI$3.class b/Dozentenmodul/bin/gui/Login_GUI$3.class
index 46796de6..3122e95a 100644
--- a/Dozentenmodul/bin/gui/Login_GUI$3.class
+++ b/Dozentenmodul/bin/gui/Login_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/Login_GUI$4.class b/Dozentenmodul/bin/gui/Login_GUI$4.class
index 22908f76..25dcca5e 100644
--- a/Dozentenmodul/bin/gui/Login_GUI$4.class
+++ b/Dozentenmodul/bin/gui/Login_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/Login_GUI$5.class b/Dozentenmodul/bin/gui/Login_GUI$5.class
index e1bf5be2..102f386f 100644
--- a/Dozentenmodul/bin/gui/Login_GUI$5.class
+++ b/Dozentenmodul/bin/gui/Login_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/Login_GUI.class b/Dozentenmodul/bin/gui/Login_GUI.class
index 98c862f5..90a674be 100644
--- a/Dozentenmodul/bin/gui/Login_GUI.class
+++ b/Dozentenmodul/bin/gui/Login_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class
index fd15e92d..146e6128 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class
index 88ddae37..67c15bd2 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class
index 497574cd..2911e439 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class
index 440eeb02..06e83799 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class
index 1d88aaf2..aef24317 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class
index ae739673..9c479610 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$6.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class
index 030ef361..8ede1444 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$7.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class
index 9c94ae89..416f6b61 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$8.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class
index 5b465837..e397e5a0 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI$9.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/SearchEditImage_GUI.class b/Dozentenmodul/bin/gui/SearchEditImage_GUI.class
index e666672d..d3e3c942 100644
--- a/Dozentenmodul/bin/gui/SearchEditImage_GUI.class
+++ b/Dozentenmodul/bin/gui/SearchEditImage_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/thrift/ThriftConnection.class b/Dozentenmodul/bin/thrift/ThriftConnection.class
index 25f7f5fe..df283ea9 100644
--- a/Dozentenmodul/bin/thrift/ThriftConnection.class
+++ b/Dozentenmodul/bin/thrift/ThriftConnection.class
Binary files differ
diff --git a/Dozentenmodul/src/GUI/FTPDownloader_GUI.java b/Dozentenmodul/src/GUI/FTPDownloader_GUI.java
index e702dc4a..ead5a020 100644
--- a/Dozentenmodul/src/GUI/FTPDownloader_GUI.java
+++ b/Dozentenmodul/src/GUI/FTPDownloader_GUI.java
@@ -47,13 +47,13 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
JLabel downspeed;
User user;
JProgressBar progressBar;
- String host="141.79.1+ü28.121";
- int port=21;
- String username="openslx";
- String password="openslx-ng";
- String downloadPath="";
- String filename="";
- static String arg="";
+ String host = "141.79.1+ü28.121";
+ int port = 21;
+ String username = "openslx";
+ String password = "openslx-ng";
+ String downloadPath = "";
+ String filename = "";
+ static String arg = "";
DownloadTask task;
JLabel bytesreadlbl;
JLabel lblNewLabel_3;
@@ -61,25 +61,21 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
long filesize;
double speed;
long bytesread;
- JLabel labelZeit;
- boolean taskrun=false;
- ThriftConnection thrift=new ThriftConnection();
- Client client=thrift.getThriftConnection();
+ JLabel labelZeit;
+ boolean taskrun = false;
+ ThriftConnection thrift = new ThriftConnection();
+ Client client = thrift.getThriftConnection();
+ JButton continueButton = new JButton("Fertigstellen");
+
/**
* Launch the application.
*/
- /*public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- FTPDownloader frame = new FTPDownloader();
- frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }*/
+ /*
+ * public static void main(String[] args) { EventQueue.invokeLater(new
+ * Runnable() { public void run() { try { FTPDownloader frame = new
+ * FTPDownloader(); frame.setVisible(true); } catch (Exception e) {
+ * e.printStackTrace(); } } }); }
+ */
/**
* Create the frame.
@@ -88,24 +84,23 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
- if(taskrun==true)
- {
+ if (taskrun == true) {
try {
client.DeleteFtpUser(user.userName);
} catch (TException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
- task.cancel(true);
+ task.cancel(true);
}
dispose();
}
});
setResizable(false);
- //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
-
- filename=name;
-
+ // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+
+ filename = name;
+
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
@@ -113,13 +108,13 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
// TODO Auto-generated catch block
e.printStackTrace();
}
-
- //filename=name;
+
+ // filename=name;
setBackground(Color.WHITE);
setTitle("Dozentenmodul *Prototyp*");
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- int top=(screenSize.height - 722) / 2;
- int left=(screenSize.width - 603) / 2;
+ int top = (screenSize.height - 722) / 2;
+ int left = (screenSize.width - 603) / 2;
setBounds(left, top, 603, 722);
getContentPane().setLayout(new BorderLayout());
contentPanel.setBackground(SystemColor.menu);
@@ -127,28 +122,29 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
getContentPane().add(contentPanel, BorderLayout.CENTER);
contentPanel.setLayout(null);
{
- JButton btnSpeicherortAuswhlen = new JButton("Speicherort ausw\u00E4hlen");
+ JButton btnSpeicherortAuswhlen = new JButton(
+ "Speicherort ausw\u00E4hlen");
btnSpeicherortAuswhlen.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
- JFileChooser fc=new JFileChooser();
+ JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-
+
fc.showOpenDialog(getParent());
- File dir=fc.getSelectedFile();
+ File dir = fc.getSelectedFile();
lblNewLabel.setText(dir.getAbsolutePath());
}
});
- btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23);
+ btnSpeicherortAuswhlen.setBounds(57, 124, 141, 23);
btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP);
btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT);
contentPanel.add(btnSpeicherortAuswhlen);
}
-
+
lblNewLabel = new JLabel("C:\\");
- lblNewLabel.setBounds(169, 124, 255, 23);
+ lblNewLabel.setBounds(208, 124, 238, 23);
contentPanel.add(lblNewLabel);
-
+
JButton btnDownloadStarten = new JButton("Download starten");
btnDownloadStarten.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
@@ -156,193 +152,224 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
}
});
- btnDownloadStarten.setBounds(10, 294, 141, 23);
+ btnDownloadStarten.setBounds(57, 168, 141, 23);
contentPanel.add(btnDownloadStarten);
-
- progressBar = new JProgressBar(0,100);
+
+ progressBar = new JProgressBar(0, 100);
progressBar.setStringPainted(true);
-
- progressBar.setBounds(10, 158, 577, 30);
+ progressBar.setBounds(57, 202, 497, 30);
contentPanel.add(progressBar);
-
- JLabel lblDownloadgeschwindigkeit = new JLabel("Downloadgeschwindigkeit:");
- lblDownloadgeschwindigkeit.setBounds(10, 194, 141, 14);
+
+ JLabel lblDownloadgeschwindigkeit = new JLabel(
+ "Downloadgeschwindigkeit:");
+ lblDownloadgeschwindigkeit.setBounds(57, 243, 141, 14);
contentPanel.add(lblDownloadgeschwindigkeit);
-
+
downspeed = new JLabel("0");
- downspeed.setBounds(261, 194, 95, 14);
+ downspeed.setBounds(308, 243, 95, 14);
contentPanel.add(downspeed);
-
+
JLabel lblNewLabel_1 = new JLabel("Fertig:");
- lblNewLabel_1.setBounds(10, 244, 46, 14);
+ lblNewLabel_1.setBounds(57, 293, 46, 14);
contentPanel.add(lblNewLabel_1);
-
+
bytesreadlbl = new JLabel("");
bytesreadlbl.setBounds(66, 244, 108, 14);
contentPanel.add(bytesreadlbl);
-
+
JLabel lblNewLabel_2 = new JLabel("von:");
- lblNewLabel_2.setBounds(179, 244, 46, 14);
+ lblNewLabel_2.setBounds(226, 293, 46, 14);
contentPanel.add(lblNewLabel_2);
-
+
lblNewLabel_3 = new JLabel("");
lblNewLabel_3.setBounds(235, 244, 108, 14);
contentPanel.add(lblNewLabel_3);
-
+
JLabel lblMbVerbleibend = new JLabel("Verbleibend:");
- lblMbVerbleibend.setBounds(10, 269, 71, 14);
+ lblMbVerbleibend.setBounds(57, 318, 71, 14);
contentPanel.add(lblMbVerbleibend);
-
+
labelVerbleibend = new JLabel("");
labelVerbleibend.setBounds(91, 269, 108, 14);
contentPanel.add(labelVerbleibend);
-
- JLabel lblGeschtzteVerbleibendeZeit = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:");
- lblGeschtzteVerbleibendeZeit.setBounds(10, 219, 150, 14);
+
+ JLabel lblGeschtzteVerbleibendeZeit = new JLabel(
+ "Gesch\u00E4tzte Verbleibende Zeit:");
+ lblGeschtzteVerbleibendeZeit.setBounds(57, 268, 150, 14);
contentPanel.add(lblGeschtzteVerbleibendeZeit);
-
+
labelZeit = new JLabel("");
labelZeit.setBounds(261, 219, 117, 14);
contentPanel.add(labelZeit);
-
+
JPanel panel = new JPanel();
panel.setLayout(null);
panel.setBackground(SystemColor.menu);
panel.setBounds(10, 11, 577, 57);
contentPanel.add(panel);
-
+
JLabel label = new JLabel("Eingabe Ihrer Daten");
label.setFont(new Font("Tahoma", Font.BOLD, 18));
label.setBounds(10, 11, 509, 22);
panel.add(label);
-
+
JTextPane textPane = new JTextPane();
textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
textPane.setEditable(false);
textPane.setBackground(SystemColor.menu);
textPane.setBounds(10, 36, 509, 32);
panel.add(textPane);
-
+
JSeparator separator = new JSeparator();
separator.setBounds(0, 79, 597, 2);
contentPanel.add(separator);
-
+
JLabel label_1 = new JLabel("Hauptmen\u00FC");
label_1.setForeground(Color.BLUE);
label_1.setBounds(20, 88, 61, 20);
contentPanel.add(label_1);
-
+
JLabel label_2 = new JLabel(">");
label_2.setBounds(80, 91, 14, 14);
contentPanel.add(label_2);
-
+
JLabel label_3 = new JLabel("VL-Image");
label_3.setForeground(Color.BLUE);
label_3.setBounds(91, 88, 46, 20);
contentPanel.add(label_3);
-
+
JLabel label_4 = new JLabel(">");
label_4.setBounds(139, 91, 14, 14);
contentPanel.add(label_4);
-
+
JLabel label_5 = new JLabel("Neu/Bearbeiten");
label_5.setBounds(149, 91, 108, 14);
contentPanel.add(label_5);
-
+
JSeparator separator_1 = new JSeparator();
separator_1.setBounds(-10, 648, 597, 2);
contentPanel.add(separator_1);
+
+ JLabel label_6 = new JLabel("1.");
+ label_6.setBounds(24, 128, 23, 14);
+ contentPanel.add(label_6);
+
+ JLabel label_7 = new JLabel("2.");
+ label_7.setBounds(24, 172, 23, 14);
+ contentPanel.add(label_7);
{
JPanel buttonPane = new JPanel();
buttonPane.setBackground(UIManager.getColor("Button.background"));
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
- JButton cancelButton = new JButton("Weiter");
- cancelButton.addActionListener(new ActionListener() {
+ continueButton.setEnabled(false);
+ continueButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- if(taskrun==true)
- {
- task.cancel(true);
- try {
- client.DeleteFtpUser(user.userName);
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
+ if (taskrun == true) {
+ task.cancel(true);
+ try {
+ client.DeleteFtpUser(user.userName);
+ } catch (TException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
}
dispose();
}
});
-
- JButton btnZurck = new JButton("Zur\u00FCck");
- btnZurck.setActionCommand("Cancel");
- buttonPane.add(btnZurck);
+
+ JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+
+ dispose();
+ MainMenue_GUI m = new MainMenue_GUI();
+ m.setVisible(true);
+
+ }
+ });
cancelButton.setActionCommand("Cancel");
buttonPane.add(cancelButton);
+ continueButton.setActionCommand("Cancel");
+ buttonPane.add(continueButton);
}
}
setVisible(true);
-
+
}
-
- private void buttonDownloadActionPerformed(ActionEvent event) {
-
- progressBar.setValue(0);
-
- try {
- user=client.getFtpUser();
- //downloadPath=client.getPathOfImage(filename);
+
+ private void buttonDownloadActionPerformed(ActionEvent event) {
+
+ progressBar.setValue(0);
+
+ try {
+ user = client.getFtpUser();
+ // downloadPath=client.getPathOfImage(filename);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
- task = new DownloadTask(host, port, user.userName, user.password,user.path, lblNewLabel.getText(), this);
- task.addPropertyChangeListener(this);
- task.execute();
- taskrun=true;
-
- }
-
+
+ task = new DownloadTask(host, port, user.userName, user.password,
+ user.path, lblNewLabel.getText(), this);
+ task.addPropertyChangeListener(this);
+ task.execute();
+ taskrun = true;
+
+ }
+
public void propertyChange(PropertyChangeEvent arg0) {
-
- if ("progress" == arg0.getPropertyName()) {
- int progress = (Integer) arg0.getNewValue();
- progressBar.setValue(progress);
- }
- if("speed"==arg0.getPropertyName()){
- speed=(double)arg0.getNewValue();
- //if(speed<=1){
-
- downspeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s");
-
- // }else
- //{
- //double MBSpeed=speed/1024;
- //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf(".")));
- //}
-
- }
- if("bytesread"==arg0.getPropertyName())
- {
- bytesread=(long)arg0.getNewValue();
- bytesreadlbl.setText((bytesread/1024/1024)+" MB");
- labelVerbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB");
-
-
- labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten");
-
-
- }
- if("filesize"==arg0.getPropertyName())
- {
- filesize=(long)arg0.getNewValue();
- lblNewLabel_3.setText((filesize/1024/1024)+" MB");
-
- }
-
+ int progress = 0;
+ if ("progress" == arg0.getPropertyName()) {
+ progress = (Integer) arg0.getNewValue();
+ progressBar.setValue(progress);
+ if (progress == 100) {
+ continueButton.setEnabled(true);
+ }
+ }
+ if ("speed" == arg0.getPropertyName()) {
+ speed = (double) arg0.getNewValue();
+ // if(speed<=1){
+
+ downspeed.setText(String.valueOf(speed).substring(0,
+ String.valueOf(speed).lastIndexOf(".") + 3)
+ + " MB/s");
+
+ // }else
+ // {
+ // double MBSpeed=speed/1024;
+ // downspeed.setText(String.valueOf((MBSpeed)).substring(0,
+ // String.valueOf(MBSpeed).indexOf(".")));
+ // }
+
+ }
+ if ("bytesread" == arg0.getPropertyName()) {
+ bytesread = (long) arg0.getNewValue();
+ bytesreadlbl.setText((bytesread / 1024 / 1024) + " MB");
+ labelVerbleibend
+ .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024))
+ + " MB");
+
+ labelZeit
+ .setText(String
+ .valueOf(
+ ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1)
+ .substring(
+ 0,
+ String.valueOf(
+ (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60)
+ .lastIndexOf("."))
+ + " Minuten");
+
+ }
+ if ("filesize" == arg0.getPropertyName()) {
+ filesize = (long) arg0.getNewValue();
+ lblNewLabel_3.setText((filesize / 1024 / 1024) + " MB");
+
+ }
+
}
} \ No newline at end of file
diff --git a/Dozentenmodul/src/GUI/Login_GUI.java b/Dozentenmodul/src/GUI/Login_GUI.java
index 50092858..8ad73e20 100644
--- a/Dozentenmodul/src/GUI/Login_GUI.java
+++ b/Dozentenmodul/src/GUI/Login_GUI.java
@@ -23,17 +23,15 @@ import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
-
import models.person;
-
import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
+//import org.apache.thrift.protocol.TBinaryProtocol;
+//import org.apache.thrift.protocol.TProtocol;
import org.ini4j.Wini;
-import thrift.AuthenticationException;
-import thrift.ImageServer;
-import thrift.InvalidTokenException;
-import thrift.SessionData;
+//import thrift.AuthenticationException;
+//import thrift.ImageServer;
+//import thrift.InvalidTokenException;
+//import thrift.SessionData;
import thrift.MasterThriftConnection;
import thrift.ImageServer.Client;
import thrift.UserInfo;
diff --git a/Dozentenmodul/src/gui/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/FTPDownloader_GUI.java
index e702dc4a..ead5a020 100644
--- a/Dozentenmodul/src/gui/FTPDownloader_GUI.java
+++ b/Dozentenmodul/src/gui/FTPDownloader_GUI.java
@@ -47,13 +47,13 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
JLabel downspeed;
User user;
JProgressBar progressBar;
- String host="141.79.1+ü28.121";
- int port=21;
- String username="openslx";
- String password="openslx-ng";
- String downloadPath="";
- String filename="";
- static String arg="";
+ String host = "141.79.1+ü28.121";
+ int port = 21;
+ String username = "openslx";
+ String password = "openslx-ng";
+ String downloadPath = "";
+ String filename = "";
+ static String arg = "";
DownloadTask task;
JLabel bytesreadlbl;
JLabel lblNewLabel_3;
@@ -61,25 +61,21 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
long filesize;
double speed;
long bytesread;
- JLabel labelZeit;
- boolean taskrun=false;
- ThriftConnection thrift=new ThriftConnection();
- Client client=thrift.getThriftConnection();
+ JLabel labelZeit;
+ boolean taskrun = false;
+ ThriftConnection thrift = new ThriftConnection();
+ Client client = thrift.getThriftConnection();
+ JButton continueButton = new JButton("Fertigstellen");
+
/**
* Launch the application.
*/
- /*public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- FTPDownloader frame = new FTPDownloader();
- frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }*/
+ /*
+ * public static void main(String[] args) { EventQueue.invokeLater(new
+ * Runnable() { public void run() { try { FTPDownloader frame = new
+ * FTPDownloader(); frame.setVisible(true); } catch (Exception e) {
+ * e.printStackTrace(); } } }); }
+ */
/**
* Create the frame.
@@ -88,24 +84,23 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
- if(taskrun==true)
- {
+ if (taskrun == true) {
try {
client.DeleteFtpUser(user.userName);
} catch (TException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
- task.cancel(true);
+ task.cancel(true);
}
dispose();
}
});
setResizable(false);
- //setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
-
- filename=name;
-
+ // setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+
+ filename = name;
+
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
@@ -113,13 +108,13 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
// TODO Auto-generated catch block
e.printStackTrace();
}
-
- //filename=name;
+
+ // filename=name;
setBackground(Color.WHITE);
setTitle("Dozentenmodul *Prototyp*");
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- int top=(screenSize.height - 722) / 2;
- int left=(screenSize.width - 603) / 2;
+ int top = (screenSize.height - 722) / 2;
+ int left = (screenSize.width - 603) / 2;
setBounds(left, top, 603, 722);
getContentPane().setLayout(new BorderLayout());
contentPanel.setBackground(SystemColor.menu);
@@ -127,28 +122,29 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
getContentPane().add(contentPanel, BorderLayout.CENTER);
contentPanel.setLayout(null);
{
- JButton btnSpeicherortAuswhlen = new JButton("Speicherort ausw\u00E4hlen");
+ JButton btnSpeicherortAuswhlen = new JButton(
+ "Speicherort ausw\u00E4hlen");
btnSpeicherortAuswhlen.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
- JFileChooser fc=new JFileChooser();
+ JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-
+
fc.showOpenDialog(getParent());
- File dir=fc.getSelectedFile();
+ File dir = fc.getSelectedFile();
lblNewLabel.setText(dir.getAbsolutePath());
}
});
- btnSpeicherortAuswhlen.setBounds(10, 124, 141, 23);
+ btnSpeicherortAuswhlen.setBounds(57, 124, 141, 23);
btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP);
btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT);
contentPanel.add(btnSpeicherortAuswhlen);
}
-
+
lblNewLabel = new JLabel("C:\\");
- lblNewLabel.setBounds(169, 124, 255, 23);
+ lblNewLabel.setBounds(208, 124, 238, 23);
contentPanel.add(lblNewLabel);
-
+
JButton btnDownloadStarten = new JButton("Download starten");
btnDownloadStarten.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
@@ -156,193 +152,224 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
}
});
- btnDownloadStarten.setBounds(10, 294, 141, 23);
+ btnDownloadStarten.setBounds(57, 168, 141, 23);
contentPanel.add(btnDownloadStarten);
-
- progressBar = new JProgressBar(0,100);
+
+ progressBar = new JProgressBar(0, 100);
progressBar.setStringPainted(true);
-
- progressBar.setBounds(10, 158, 577, 30);
+ progressBar.setBounds(57, 202, 497, 30);
contentPanel.add(progressBar);
-
- JLabel lblDownloadgeschwindigkeit = new JLabel("Downloadgeschwindigkeit:");
- lblDownloadgeschwindigkeit.setBounds(10, 194, 141, 14);
+
+ JLabel lblDownloadgeschwindigkeit = new JLabel(
+ "Downloadgeschwindigkeit:");
+ lblDownloadgeschwindigkeit.setBounds(57, 243, 141, 14);
contentPanel.add(lblDownloadgeschwindigkeit);
-
+
downspeed = new JLabel("0");
- downspeed.setBounds(261, 194, 95, 14);
+ downspeed.setBounds(308, 243, 95, 14);
contentPanel.add(downspeed);
-
+
JLabel lblNewLabel_1 = new JLabel("Fertig:");
- lblNewLabel_1.setBounds(10, 244, 46, 14);
+ lblNewLabel_1.setBounds(57, 293, 46, 14);
contentPanel.add(lblNewLabel_1);
-
+
bytesreadlbl = new JLabel("");
bytesreadlbl.setBounds(66, 244, 108, 14);
contentPanel.add(bytesreadlbl);
-
+
JLabel lblNewLabel_2 = new JLabel("von:");
- lblNewLabel_2.setBounds(179, 244, 46, 14);
+ lblNewLabel_2.setBounds(226, 293, 46, 14);
contentPanel.add(lblNewLabel_2);
-
+
lblNewLabel_3 = new JLabel("");
lblNewLabel_3.setBounds(235, 244, 108, 14);
contentPanel.add(lblNewLabel_3);
-
+
JLabel lblMbVerbleibend = new JLabel("Verbleibend:");
- lblMbVerbleibend.setBounds(10, 269, 71, 14);
+ lblMbVerbleibend.setBounds(57, 318, 71, 14);
contentPanel.add(lblMbVerbleibend);
-
+
labelVerbleibend = new JLabel("");
labelVerbleibend.setBounds(91, 269, 108, 14);
contentPanel.add(labelVerbleibend);
-
- JLabel lblGeschtzteVerbleibendeZeit = new JLabel("Gesch\u00E4tzte Verbleibende Zeit:");
- lblGeschtzteVerbleibendeZeit.setBounds(10, 219, 150, 14);
+
+ JLabel lblGeschtzteVerbleibendeZeit = new JLabel(
+ "Gesch\u00E4tzte Verbleibende Zeit:");
+ lblGeschtzteVerbleibendeZeit.setBounds(57, 268, 150, 14);
contentPanel.add(lblGeschtzteVerbleibendeZeit);
-
+
labelZeit = new JLabel("");
labelZeit.setBounds(261, 219, 117, 14);
contentPanel.add(labelZeit);
-
+
JPanel panel = new JPanel();
panel.setLayout(null);
panel.setBackground(SystemColor.menu);
panel.setBounds(10, 11, 577, 57);
contentPanel.add(panel);
-
+
JLabel label = new JLabel("Eingabe Ihrer Daten");
label.setFont(new Font("Tahoma", Font.BOLD, 18));
label.setBounds(10, 11, 509, 22);
panel.add(label);
-
+
JTextPane textPane = new JTextPane();
textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
textPane.setEditable(false);
textPane.setBackground(SystemColor.menu);
textPane.setBounds(10, 36, 509, 32);
panel.add(textPane);
-
+
JSeparator separator = new JSeparator();
separator.setBounds(0, 79, 597, 2);
contentPanel.add(separator);
-
+
JLabel label_1 = new JLabel("Hauptmen\u00FC");
label_1.setForeground(Color.BLUE);
label_1.setBounds(20, 88, 61, 20);
contentPanel.add(label_1);
-
+
JLabel label_2 = new JLabel(">");
label_2.setBounds(80, 91, 14, 14);
contentPanel.add(label_2);
-
+
JLabel label_3 = new JLabel("VL-Image");
label_3.setForeground(Color.BLUE);
label_3.setBounds(91, 88, 46, 20);
contentPanel.add(label_3);
-
+
JLabel label_4 = new JLabel(">");
label_4.setBounds(139, 91, 14, 14);
contentPanel.add(label_4);
-
+
JLabel label_5 = new JLabel("Neu/Bearbeiten");
label_5.setBounds(149, 91, 108, 14);
contentPanel.add(label_5);
-
+
JSeparator separator_1 = new JSeparator();
separator_1.setBounds(-10, 648, 597, 2);
contentPanel.add(separator_1);
+
+ JLabel label_6 = new JLabel("1.");
+ label_6.setBounds(24, 128, 23, 14);
+ contentPanel.add(label_6);
+
+ JLabel label_7 = new JLabel("2.");
+ label_7.setBounds(24, 172, 23, 14);
+ contentPanel.add(label_7);
{
JPanel buttonPane = new JPanel();
buttonPane.setBackground(UIManager.getColor("Button.background"));
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
- JButton cancelButton = new JButton("Weiter");
- cancelButton.addActionListener(new ActionListener() {
+ continueButton.setEnabled(false);
+ continueButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- if(taskrun==true)
- {
- task.cancel(true);
- try {
- client.DeleteFtpUser(user.userName);
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
+ if (taskrun == true) {
+ task.cancel(true);
+ try {
+ client.DeleteFtpUser(user.userName);
+ } catch (TException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
}
dispose();
}
});
-
- JButton btnZurck = new JButton("Zur\u00FCck");
- btnZurck.setActionCommand("Cancel");
- buttonPane.add(btnZurck);
+
+ JButton cancelButton = new JButton("Zur\u00FCck");
+ cancelButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+
+ dispose();
+ MainMenue_GUI m = new MainMenue_GUI();
+ m.setVisible(true);
+
+ }
+ });
cancelButton.setActionCommand("Cancel");
buttonPane.add(cancelButton);
+ continueButton.setActionCommand("Cancel");
+ buttonPane.add(continueButton);
}
}
setVisible(true);
-
+
}
-
- private void buttonDownloadActionPerformed(ActionEvent event) {
-
- progressBar.setValue(0);
-
- try {
- user=client.getFtpUser();
- //downloadPath=client.getPathOfImage(filename);
+
+ private void buttonDownloadActionPerformed(ActionEvent event) {
+
+ progressBar.setValue(0);
+
+ try {
+ user = client.getFtpUser();
+ // downloadPath=client.getPathOfImage(filename);
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
-
- task = new DownloadTask(host, port, user.userName, user.password,user.path, lblNewLabel.getText(), this);
- task.addPropertyChangeListener(this);
- task.execute();
- taskrun=true;
-
- }
-
+
+ task = new DownloadTask(host, port, user.userName, user.password,
+ user.path, lblNewLabel.getText(), this);
+ task.addPropertyChangeListener(this);
+ task.execute();
+ taskrun = true;
+
+ }
+
public void propertyChange(PropertyChangeEvent arg0) {
-
- if ("progress" == arg0.getPropertyName()) {
- int progress = (Integer) arg0.getNewValue();
- progressBar.setValue(progress);
- }
- if("speed"==arg0.getPropertyName()){
- speed=(double)arg0.getNewValue();
- //if(speed<=1){
-
- downspeed.setText(String.valueOf(speed).substring(0,String.valueOf(speed).lastIndexOf(".")+3)+" MB/s");
-
- // }else
- //{
- //double MBSpeed=speed/1024;
- //downspeed.setText(String.valueOf((MBSpeed)).substring(0, String.valueOf(MBSpeed).indexOf(".")));
- //}
-
- }
- if("bytesread"==arg0.getPropertyName())
- {
- bytesread=(long)arg0.getNewValue();
- bytesreadlbl.setText((bytesread/1024/1024)+" MB");
- labelVerbleibend.setText(((filesize/1024/1024)-(bytesread/1024/1024))+" MB");
-
-
- labelZeit.setText(String.valueOf(((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60)+1).substring(0,String.valueOf((((filesize/1024/1024)-(bytesread/1024/1024))/speed)/60).lastIndexOf("."))+ " Minuten");
-
-
- }
- if("filesize"==arg0.getPropertyName())
- {
- filesize=(long)arg0.getNewValue();
- lblNewLabel_3.setText((filesize/1024/1024)+" MB");
-
- }
-
+ int progress = 0;
+ if ("progress" == arg0.getPropertyName()) {
+ progress = (Integer) arg0.getNewValue();
+ progressBar.setValue(progress);
+ if (progress == 100) {
+ continueButton.setEnabled(true);
+ }
+ }
+ if ("speed" == arg0.getPropertyName()) {
+ speed = (double) arg0.getNewValue();
+ // if(speed<=1){
+
+ downspeed.setText(String.valueOf(speed).substring(0,
+ String.valueOf(speed).lastIndexOf(".") + 3)
+ + " MB/s");
+
+ // }else
+ // {
+ // double MBSpeed=speed/1024;
+ // downspeed.setText(String.valueOf((MBSpeed)).substring(0,
+ // String.valueOf(MBSpeed).indexOf(".")));
+ // }
+
+ }
+ if ("bytesread" == arg0.getPropertyName()) {
+ bytesread = (long) arg0.getNewValue();
+ bytesreadlbl.setText((bytesread / 1024 / 1024) + " MB");
+ labelVerbleibend
+ .setText(((filesize / 1024 / 1024) - (bytesread / 1024 / 1024))
+ + " MB");
+
+ labelZeit
+ .setText(String
+ .valueOf(
+ ((((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60) + 1)
+ .substring(
+ 0,
+ String.valueOf(
+ (((filesize / 1024 / 1024) - (bytesread / 1024 / 1024)) / speed) / 60)
+ .lastIndexOf("."))
+ + " Minuten");
+
+ }
+ if ("filesize" == arg0.getPropertyName()) {
+ filesize = (long) arg0.getNewValue();
+ lblNewLabel_3.setText((filesize / 1024 / 1024) + " MB");
+
+ }
+
}
} \ No newline at end of file
diff --git a/Dozentenmodul/src/gui/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/FTPEditUploader_GUI.java
index fcc804c4..9f073993 100644
--- a/Dozentenmodul/src/gui/FTPEditUploader_GUI.java
+++ b/Dozentenmodul/src/gui/FTPEditUploader_GUI.java
@@ -15,7 +15,6 @@ import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
-
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@@ -30,9 +29,8 @@ import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
-
import models.Image;
-import models.person;
+//import models.person;
import org.apache.thrift.TException;
diff --git a/Dozentenmodul/src/gui/Login_GUI.java b/Dozentenmodul/src/gui/Login_GUI.java
index 50092858..8ad73e20 100644
--- a/Dozentenmodul/src/gui/Login_GUI.java
+++ b/Dozentenmodul/src/gui/Login_GUI.java
@@ -23,17 +23,15 @@ import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
-
import models.person;
-
import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
+//import org.apache.thrift.protocol.TBinaryProtocol;
+//import org.apache.thrift.protocol.TProtocol;
import org.ini4j.Wini;
-import thrift.AuthenticationException;
-import thrift.ImageServer;
-import thrift.InvalidTokenException;
-import thrift.SessionData;
+//import thrift.AuthenticationException;
+//import thrift.ImageServer;
+//import thrift.InvalidTokenException;
+//import thrift.SessionData;
import thrift.MasterThriftConnection;
import thrift.ImageServer.Client;
import thrift.UserInfo;
diff --git a/Dozentenmodul/src/gui/SearchEditImage_GUI.java b/Dozentenmodul/src/gui/SearchEditImage_GUI.java
index c2b4b080..c40a287e 100644
--- a/Dozentenmodul/src/gui/SearchEditImage_GUI.java
+++ b/Dozentenmodul/src/gui/SearchEditImage_GUI.java
@@ -17,8 +17,6 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
@@ -45,9 +43,8 @@ import javax.swing.event.ChangeListener;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
-
import models.Image;
-import models.person;
+//import models.person;
import org.apache.thrift.TException;
diff --git a/Dozentenmodul/src/thrift/ThriftConnection.java b/Dozentenmodul/src/thrift/ThriftConnection.java
index 21baff96..2a2bbf35 100644
--- a/Dozentenmodul/src/thrift/ThriftConnection.java
+++ b/Dozentenmodul/src/thrift/ThriftConnection.java
@@ -32,6 +32,7 @@ public class ThriftConnection {
public void closeThriftConnection()
{
+ System.out.println("Verbindung wird geplant getrennt...");
transport.close();
}
}