diff options
Diffstat (limited to 'dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java b/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java index 54d7c6a7..88ac00a6 100644 --- a/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java +++ b/dozentenmodul/src/main/java/gui/image/FTPSearchDownloader_GUI.java @@ -104,6 +104,13 @@ public class FTPSearchDownloader_GUI extends JFrame implements * Create the frame. */ public FTPSearchDownloader_GUI(Component formerGUI) { + + try { + client.setTokenForSession(SessionData.session.getAuthToken()); + } catch (TException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } final Object[] options = { "Beenden", "Abbrechen" }; @@ -197,7 +204,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements lblPath.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent arg0) { - if (lblPath.getText() == null) { + if (lblPath.getText().trim() == null) { // wenn leer, dann upload button nicht freigeben btnDownloadStarten.setEnabled(false); btnDownloadStarten.setText("Bitte warten"); @@ -480,7 +487,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements dispose(); }// end else // save config in any case - Config.setLastDownloadPath(lblPath.getText()); + Config.setLastDownloadPath(lblPath.getText().trim()); Config.store(); }// end action }); @@ -490,7 +497,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements btnMainMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - Config.setLastDownloadPath(lblPath.getText()); + Config.setLastDownloadPath(lblPath.getText().trim()); Config.store(); MainMenue_GUI mm = new MainMenue_GUI(c); @@ -510,12 +517,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements } }); menuBar.add(mnNewMenu_Info); - try { - client.setTokenForSession(SessionData.session.getAuthToken()); - } catch (TException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } + c = this; setVisible(true); @@ -545,7 +547,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements } task = new DownloadTask(host, port, user.userName, user.password, - downloadFile, lblPath.getText()); + downloadFile, lblPath.getText().trim()); task.addPropertyChangeListener(this); task.execute(); taskrun = true; @@ -611,8 +613,8 @@ public class FTPSearchDownloader_GUI extends JFrame implements public boolean isCurrentlyLoading() { isCurrentlyLoading = false; - if (lblVerbleibend.getText().equals("0 MB") - || lblVerbleibend.getText().equals("0")) { + if (lblVerbleibend.getText().trim().equals("0 MB") + || lblVerbleibend.getText().trim().equals("0")) { isCurrentlyLoading = false; } else { isCurrentlyLoading = true; |
