diff options
| author | Tobias Spitzer | 2014-08-25 12:59:24 +0200 |
|---|---|---|
| committer | Tobias Spitzer | 2014-08-25 12:59:24 +0200 |
| commit | a5b3b060fbc1641bf5e83f895fe0e517da9c9824 (patch) | |
| tree | ebe775579f3b4c7c2d47c633ea0f24f50e82e4a0 | |
| parent | Initialrechte für Veranstaltungen nun Verfügbar (diff) | |
| parent | Anleitung zur Nutzung einer VMDK hinzugefügt (diff) | |
| download | tutor-module-a5b3b060fbc1641bf5e83f895fe0e517da9c9824.tar.gz tutor-module-a5b3b060fbc1641bf5e83f895fe0e517da9c9824.tar.xz tutor-module-a5b3b060fbc1641bf5e83f895fe0e517da9c9824.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tutor-module
| -rw-r--r-- | Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java | 24 | ||||
| -rw-r--r-- | Dozentenmodul/src/gui/image/FTPSearchDownloader_GUI.java | 24 | ||||
| -rw-r--r-- | Dozentenmodul/src/models/Links.java | 141 |
3 files changed, 52 insertions, 137 deletions
diff --git a/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java index acd95833..c851ea37 100644 --- a/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditDownloader_GUI.java @@ -2,6 +2,7 @@ package gui.image; import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Cursor; import java.awt.FlowLayout; import java.awt.Font; import java.awt.SystemColor; @@ -77,6 +78,7 @@ public class FTPEditDownloader_GUI extends JFrame implements PropertyChangeListe Client client = models.Client.clientcon.getClient(); JButton btnZurck = new JButton("Zur\u00FCck"); JButton btnDownloadStarten = new JButton("Download starten"); + private JLabel lblAnleitung; @@ -289,7 +291,7 @@ public class FTPEditDownloader_GUI extends JFrame implements PropertyChangeListe JLabel lblKlickenSieAuf = new JLabel( "Klicken Sie auf \"Fertigstellen\"."); - lblKlickenSieAuf.setBounds(98, 423, 241, 14); + lblKlickenSieAuf.setBounds(102, 423, 241, 14); contentPanel.add(lblKlickenSieAuf); JMenuBar menuBar = new JMenuBar(); @@ -353,6 +355,26 @@ public class FTPEditDownloader_GUI extends JFrame implements PropertyChangeListe } }); menu.add(mntmAbout); + + lblAnleitung = new JLabel("<HTML><U>Anleitung zum erstellen einer virtuellen Maschine herunterladen</U></HTML>"); + lblAnleitung.setForeground(Color.BLUE); + lblAnleitung.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + OpenLinks open = new OpenLinks(); + + URI anleitung; + try { + anleitung = new URI(Links.getAnleitungVMDK()); + open.openWebpage(anleitung); + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }); + lblAnleitung.setBounds(102, 448, 311, 14); + contentPanel.add(lblAnleitung); { JPanel buttonPane = new JPanel(); buttonPane.setBackground(UIManager.getColor("Button.background")); diff --git a/Dozentenmodul/src/gui/image/FTPSearchDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPSearchDownloader_GUI.java index f28c358e..ca3ac268 100644 --- a/Dozentenmodul/src/gui/image/FTPSearchDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPSearchDownloader_GUI.java @@ -78,6 +78,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements PropertyChangeLis JButton btnZurck = new JButton("Zur\u00FCck"); JButton btnDownloadStarten = new JButton("Download starten"); JButton btnMainMenu = new JButton("Hauptmen\u00FC"); + private JLabel lblAnleitung; /** @@ -289,7 +290,7 @@ public class FTPSearchDownloader_GUI extends JFrame implements PropertyChangeLis JLabel lblKlickenSieAuf = new JLabel( "Klicken Sie auf \"Fertigstellen\"."); - lblKlickenSieAuf.setBounds(98, 423, 241, 14); + lblKlickenSieAuf.setBounds(102, 423, 241, 14); contentPanel.add(lblKlickenSieAuf); JMenuBar menuBar = new JMenuBar(); @@ -353,6 +354,27 @@ public class FTPSearchDownloader_GUI extends JFrame implements PropertyChangeLis } }); menu.add(mntmAbout); + + lblAnleitung = new JLabel("<HTML><U>Anleitung zum erstellen einer virtuellen Maschine herunterladen</U></HTML>"); + lblAnleitung.setForeground(Color.BLUE); + lblAnleitung.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent arg0) { + OpenLinks open = new OpenLinks(); + + URI anleitung; + try { + anleitung = new URI(Links.getAnleitungVMDK()); + open.openWebpage(anleitung); + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }); + lblAnleitung.setBounds(102, 448, 311, 14); + contentPanel.add(lblAnleitung); + { JPanel buttonPane = new JPanel(); buttonPane.setBackground(UIManager.getColor("Button.background")); diff --git a/Dozentenmodul/src/models/Links.java b/Dozentenmodul/src/models/Links.java index f72284b0..37963440 100644 --- a/Dozentenmodul/src/models/Links.java +++ b/Dozentenmodul/src/models/Links.java @@ -1,8 +1,5 @@ package models; -import java.io.IOException; - - public class Links { private static String FAQ = "http://bwlehrpool.hs-offenburg.de/"; @@ -15,146 +12,20 @@ public class Links { return FAQ; } + public static String getAnleitungVMDK(){ + return AnleitungVMDK; + } + public static String getOTRS() { return OTRS; } - public static void openFAQ() { - - String faq = FAQ; - Runtime rt = Runtime.getRuntime(); - String os = System.getProperty("os.name"); - - try { - - - if (os.indexOf( "Win" ) >= 0) { - - rt.exec( "rundll32 url.dll,FileProtocolHandler " + faq); - - } else if (os.indexOf( "Mac" ) >= 0) { - - rt.exec( "open " + faq); - - } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { - - // Do a best guess on unix until we get a platform independent way - // Build a list of browsers to try, in this order. - String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror", - "netscape","opera","links","lynx"}; - - StringBuffer cmd = new StringBuffer(); - for (int i=0; i<browsers.length; i++) - cmd.append( (i==0 ? "" : " || " ) + browsers[i] +" \"" + faq + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - if (os.indexOf("Win") >= 0) { - - // this doesn't support showing urls in the form of - // "page.html#nameLink" - rt.exec("rundll32 url.dll,FileProtocolHandler " + faq); - - } else if (os.indexOf("Mac") >= 0) { - - rt.exec("open " + faq); - - } else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) { - - // Do a best guess on unix until we get a platform independent - // way - // Build a list of browsers to try, in this order. - String[] browsers = { "epiphany", "firefox", "mozilla", - "konqueror", "netscape", "opera", "links", "lynx" }; - - // Build a command string which looks like - // "browser1 "url" || browser2 "url" ||..." - StringBuffer cmd = new StringBuffer(); - for (int i = 0; i < browsers.length; i++) - cmd.append((i == 0 ? "" : " || ") + browsers[i] + " \"" - + faq + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - public static void openOTRS() { - - String otrs = OTRS; - Runtime rt = Runtime.getRuntime(); - String os = System.getProperty("os.name"); - - try { - - if (os.indexOf( "Win" ) >= 0) { - - rt.exec( "rundll32 url.dll,FileProtocolHandler " + otrs); - - } else if (os.indexOf( "Mac" ) >= 0) { - - rt.exec( "open " + otrs); - - } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { - - String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror", - "netscape","opera","links","lynx"}; - - StringBuffer cmd = new StringBuffer(); - for (int i=0; i<browsers.length; i++) - cmd.append( (i==0 ? "" : " || " ) + browsers[i] +" \"" + otrs + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - if (os.indexOf("Win") >= 0) { - - // this doesn't support showing urls in the form of - // "page.html#nameLink" - rt.exec("rundll32 url.dll,FileProtocolHandler " + otrs); - - } else if (os.indexOf("Mac") >= 0) { - - rt.exec("open " + otrs); - - } else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) { - - // Do a best guess on unix until we get a platform independent - // way - // Build a list of browsers to try, in this order. - String[] browsers = { "epiphany", "firefox", "mozilla", - "konqueror", "netscape", "opera", "links", "lynx" }; - - // Build a command string which looks like - // "browser1 "url" || browser2 "url" ||..." - StringBuffer cmd = new StringBuffer(); - for (int i = 0; i < browsers.length; i++) - cmd.append((i == 0 ? "" : " || ") + browsers[i] + " \"" - + otrs + "\" "); - - rt.exec(new String[] { "sh", "-c", cmd.toString() }); - } - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - public static String getUriWindows() { return uriWindows; } public static String getUriLinux() { return uriLinux; - } + } -} +}// end class |
