diff options
| author | unknown | 2014-05-25 17:49:07 +0200 |
|---|---|---|
| committer | unknown | 2014-05-25 17:49:07 +0200 |
| commit | b0b65eca6b6600a57d71c5f63f8e5a066e6accd7 (patch) | |
| tree | 21b55c6f7ff2c60401ede9f369738b2ae2d5f77f /Dozentenmodul/src/gui/intro/VmWareLink_GUI.java | |
| parent | links + encoding (diff) | |
| parent | Freigabe Mechanismus implementiert, nun sollte die notwendige Grundlage für d... (diff) | |
| download | tutor-module-b0b65eca6b6600a57d71c5f63f8e5a066e6accd7.tar.gz tutor-module-b0b65eca6b6600a57d71c5f63f8e5a066e6accd7.tar.xz tutor-module-b0b65eca6b6600a57d71c5f63f8e5a066e6accd7.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
ffffDozentenmodul/bin/gui/image/CreateImageTechnisch_GUI.class
Dozentenmodul/bin/gui/image/DeleteImage_GUI.class
Dozentenmodul/bin/gui/image/EditImageAllgemein_GUI.class
Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class
Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class
Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class
Dozentenmodul/bin/gui/image/SearchEditImage_GUI.class
Dozentenmodul/bin/gui/image/SearchImage_GUI.class
Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class
Dozentenmodul/bin/gui/lecture/CreateLectureAllgemein_GUI.class
Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class
Dozentenmodul/bin/gui/lecture/ExtendedSearchForImages_GUI.class
Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java
Dozentenmodul/src/models/Links.java
Diffstat (limited to 'Dozentenmodul/src/gui/intro/VmWareLink_GUI.java')
| -rw-r--r-- | Dozentenmodul/src/gui/intro/VmWareLink_GUI.java | 68 |
1 files changed, 45 insertions, 23 deletions
diff --git a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java index 607ccf17..59f47f4b 100644 --- a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java +++ b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java @@ -7,7 +7,6 @@ import java.awt.FlowLayout; import java.awt.Toolkit; import javax.swing.JFrame; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.UIManager; @@ -34,9 +33,7 @@ import java.awt.event.WindowEvent; import javax.swing.JCheckBox; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; - import models.Links; - import org.ini4j.InvalidFileFormatException; import org.ini4j.Wini; @@ -47,18 +44,8 @@ public class VmWareLink_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; JCheckBox chckbxNewCheckBox; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - VmWareLink_GUI dialog = new VmWareLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } + private JButton btnWindows; + /** * Create the dialog. @@ -169,13 +156,36 @@ public class VmWareLink_GUI extends JFrame { lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14); contentPanel.add(lbllinuxvmwarePlayer); - JLabel lblvmwarePlayerDownload = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>"); - lblvmwarePlayerDownload.setBounds(10, 118, 499, 14); - contentPanel.add(lblvmwarePlayerDownload); + btnWindows = new JButton("VMware Player herunterladen"); + btnWindows.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + try { + URI windows= new URI(Links.getUriWindows()); + openWebpage(windows); + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + }); + btnWindows.setBounds(10, 119, 186, 23); + contentPanel.add(btnWindows); - JLabel lblvmwarePlayerDownload_1 = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>"); - lblvmwarePlayerDownload_1.setBounds(10, 203, 499, 14); - contentPanel.add(lblvmwarePlayerDownload_1); + JButton btnLinux = new JButton("VMware Player herunterladen"); + btnLinux.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + URI windows= new URI(Links.getUriLinux()); + openWebpage(windows); + } catch (URISyntaxException f) { + // TODO Auto-generated catch block + f.printStackTrace(); + } + } + }); + btnLinux.setBounds(10, 203, 186, 23); + contentPanel.add(btnLinux); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 630, 587, 33); @@ -242,5 +252,17 @@ public class VmWareLink_GUI extends JFrame { - } -} + }//end constructor + + public static void openWebpage(URI uri) { + Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; + if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { + try { + desktop.browse(uri); + } catch (Exception e) { + e.printStackTrace(); + } + } + }// end openWebpage + +}// end class |
