summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java
diff options
context:
space:
mode:
authorTobias Spitzer2014-08-25 14:53:14 +0200
committerTobias Spitzer2014-08-25 14:53:14 +0200
commit4717a283f45eb8433767d0d0ca71cfdda7fccf61 (patch)
tree8e4a8315f0fa3a56cf6df7f97e7ef39e3ce0dbdb /Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java
parentMerge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff)
downloadtutor-module-4717a283f45eb8433767d0d0ca71cfdda7fccf61.tar.gz
tutor-module-4717a283f45eb8433767d0d0ca71cfdda7fccf61.tar.xz
tutor-module-4717a283f45eb8433767d0d0ca71cfdda7fccf61.zip
Letzter Down- und Uploadpfad werden nun in die Konfig geschrieben
Diffstat (limited to 'Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java
index 8f7bb8ce..7a439934 100644
--- a/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java
+++ b/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java
@@ -72,6 +72,7 @@ public class FTPEditDownloader_GUI extends JFrame implements
JLabel lblBytesread;
JLabel lblNewLabel_3;
JLabel labelVerbleibend;
+ JFileChooser fc;
long filesize;
double speed;
int progress = 0; // progress of download
@@ -154,10 +155,7 @@ public class FTPEditDownloader_GUI extends JFrame implements
"Speicherort ausw\u00E4hlen");
btnSpeicherortAuswhlen.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
- JFileChooser fc = new JFileChooser();
- fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- fc.showOpenDialog(getParent());
try {
Wini ini = new Wini(
new File(
@@ -165,7 +163,10 @@ public class FTPEditDownloader_GUI extends JFrame implements
+ System.getProperty("user.name")
+ "\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini"));
System.out.println("FileChooser Pfad: "+ini.get("main", "Letzter Downloadpfad", String.class));
- fc.setCurrentDirectory(new File(ini.get("main", "Letzter Downloadpfad", String.class)));
+ fc = new JFileChooser(ini.get("main", "Letzter Downloadpfad", String.class));
+ fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+
+ fc.showOpenDialog(getParent());
} catch (InvalidFileFormatException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
@@ -173,6 +174,7 @@ public class FTPEditDownloader_GUI extends JFrame implements
// TODO Auto-generated catch block
e2.printStackTrace();
}
+
File dir = fc.getSelectedFile();
// check if directory is selected
if (dir != null) {