summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/GUI/Downloader.java
diff options
context:
space:
mode:
authortspitzer2013-09-09 15:59:37 +0200
committertspitzer2013-09-09 15:59:37 +0200
commite5dfd4e457635ff292190cd800cf9ade0ec7cd8c (patch)
tree5d5166ab9472fd8f9253f14fb67efa9913e53886 /Dozentenmodul/src/GUI/Downloader.java
parentneue features (diff)
downloadtutor-module-e5dfd4e457635ff292190cd800cf9ade0ec7cd8c.tar.gz
tutor-module-e5dfd4e457635ff292190cd800cf9ade0ec7cd8c.tar.xz
tutor-module-e5dfd4e457635ff292190cd800cf9ade0ec7cd8c.zip
Alle GUIs für das bauen einer VL auf Basis einer Rohling sind fertig.
Nun muss noch die DB Anbindung implementiert werden
Diffstat (limited to 'Dozentenmodul/src/GUI/Downloader.java')
-rw-r--r--Dozentenmodul/src/GUI/Downloader.java117
1 files changed, 0 insertions, 117 deletions
diff --git a/Dozentenmodul/src/GUI/Downloader.java b/Dozentenmodul/src/GUI/Downloader.java
deleted file mode 100644
index 8a44c38b..00000000
--- a/Dozentenmodul/src/GUI/Downloader.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package GUI;
-
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JFileChooser;
-import javax.swing.JPanel;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
-import javax.swing.border.EmptyBorder;
-import java.awt.Color;
-import javax.swing.SwingConstants;
-import javax.swing.JLabel;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.io.File;
-import javax.swing.JProgressBar;
-
-import ftp.ftp;
-
-public class Downloader extends JDialog {
-
- private final JPanel contentPanel = new JPanel();
- JLabel lblNewLabel;
- JProgressBar progressBar;
- ftp f=new ftp();
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- try {
- Downloader dialog = new Downloader();
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Create the dialog.
- */
- public Downloader() {
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (ClassNotFoundException | InstantiationException
- | IllegalAccessException | UnsupportedLookAndFeelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- setBackground(Color.WHITE);
- setTitle("Downloader");
- setBounds(100, 100, 450, 218);
- getContentPane().setLayout(new BorderLayout());
- contentPanel.setBackground(Color.WHITE);
- contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
- getContentPane().add(contentPanel, BorderLayout.CENTER);
- contentPanel.setLayout(null);
- {
- JButton btnSpeicherortAuswhlen = new JButton("Speicherort ausw\u00E4hlen");
- btnSpeicherortAuswhlen.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent arg0) {
- JFileChooser fc=new JFileChooser();
- fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-
- fc.showOpenDialog(getParent());
- File dir=fc.getSelectedFile();
- lblNewLabel.setText(dir.getAbsolutePath());
- }
- });
- btnSpeicherortAuswhlen.setBounds(10, 11, 141, 23);
- btnSpeicherortAuswhlen.setVerticalAlignment(SwingConstants.TOP);
- btnSpeicherortAuswhlen.setHorizontalAlignment(SwingConstants.LEFT);
- contentPanel.add(btnSpeicherortAuswhlen);
- }
-
- lblNewLabel = new JLabel("C:\\");
- lblNewLabel.setBounds(169, 11, 255, 23);
- contentPanel.add(lblNewLabel);
-
- JButton btnDownloadStarten = new JButton("Download starten");
- btnDownloadStarten.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- progressBar.setValue(0);
- long fsize=f.getFileSize("BESCHREIBUNG.xml");
- f.getFile("BESCHREIBUNG.xml", lblNewLabel.getText().toString());
- }
- });
- btnDownloadStarten.setBounds(10, 106, 141, 23);
- contentPanel.add(btnDownloadStarten);
-
- progressBar = new JProgressBar(0,100);
- progressBar.setBounds(10, 45, 414, 30);
- contentPanel.add(progressBar);
- {
- JPanel buttonPane = new JPanel();
- buttonPane.setBackground(Color.WHITE);
- buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
- getContentPane().add(buttonPane, BorderLayout.SOUTH);
- {
- JButton okButton = new JButton("OK");
- okButton.setActionCommand("OK");
- buttonPane.add(okButton);
- getRootPane().setDefaultButton(okButton);
- }
- {
- JButton cancelButton = new JButton("Zur\u00FCck");
- cancelButton.setActionCommand("Cancel");
- buttonPane.add(cancelButton);
- }
- }
- }
-}