From 3ba6103a7034772ed1c1a28c594cb7fe60664573 Mon Sep 17 00:00:00 2001 From: Stephan Schwaer Date: Tue, 1 Sep 2015 17:05:08 +0200 Subject: [client] Open vmware link in virtualizer info. --- .../dozmod/gui/window/VirtualizerNoticeWindow.java | 27 +++++++++++----------- .../layout/VirtualizerNoticeWindowLayout.java | 17 ++++++-------- .../java/org/openslx/dozmod/util/OpenLinks.java | 4 ++-- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtualizerNoticeWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtualizerNoticeWindow.java index 3a9b6bdd..bd38b175 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtualizerNoticeWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtualizerNoticeWindow.java @@ -11,6 +11,8 @@ import javax.swing.JFrame; import org.apache.log4j.Logger; import org.openslx.dozmod.Config; import org.openslx.dozmod.gui.window.layout.VirtualizerNoticeWindowLayout; +import org.openslx.dozmod.util.OpenLinks; +import org.openslx.dozmod.util.OpenLinks.Link; @SuppressWarnings("serial") public class VirtualizerNoticeWindow extends VirtualizerNoticeWindowLayout { @@ -23,14 +25,11 @@ public class VirtualizerNoticeWindow extends VirtualizerNoticeWindowLayout { final VirtualizerNoticeWindow me = this; setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - // Resore state of "don't show again" option - readCheck.setSelected(Config.getVirtualizerRead()); - // function for close button continueButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - Config.setVirtualizerRead(readCheck.isSelected()); + Config.setVirtualizerRead(true); me.dispose(); } }); @@ -38,23 +37,23 @@ public class VirtualizerNoticeWindow extends VirtualizerNoticeWindowLayout { this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { - Config.setVirtualizerRead(readCheck.isSelected()); - } - }); - - linuxDLButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - //clickedLinuxDLButton(); + Config.setVirtualizerRead(true); } }); - windowsDLButton.addActionListener(new ActionListener() { + btnDL.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - //clickedWindowsDLButton(); + OpenLinks.openWebpage(Link.VMWARE); } }); +// +// windowsDLButton.addActionListener(new ActionListener() { +// @Override +// public void actionPerformed(ActionEvent e) { +// //clickedWindowsDLButton(); +// } +// }); } diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java index 6e1574e1..3b711132 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java @@ -24,9 +24,8 @@ public abstract class VirtualizerNoticeWindowLayout extends JDialog { + ""; - protected JButton windowsDLButton; - protected JButton linuxDLButton; - protected JCheckBox readCheck; +// protected JButton windowsDLButton; + protected JButton btnDL; protected JButton continueButton; public VirtualizerNoticeWindowLayout(Frame modalParent) { @@ -50,17 +49,15 @@ public abstract class VirtualizerNoticeWindowLayout extends JDialog { infoPane.add(Box.createRigidArea(new Dimension(0, 10))); // Download buttons - windowsDLButton = new JButton("VMWare Player für Windows herunterladen"); - linuxDLButton = new JButton("VMWare Player für Linux herunterladen"); - infoPane.add(windowsDLButton); - infoPane.add(linuxDLButton); +// windowsDLButton = new JButton("VMWare Player für Windows herunterladen"); + btnDL = new JButton("VMWare Player herunterladen"); +// infoPane.add(windowsDLButton); + infoPane.add(btnDL); // Bottom controls JPanel bottomPane = new JPanel(); bottomPane.setLayout(new BoxLayout(bottomPane, BoxLayout.LINE_AXIS)); - - readCheck = new JCheckBox("Diese Benachrichtigung nicht mehr anzeigen"); - bottomPane.add(readCheck); + bottomPane.add(Box.createHorizontalGlue()); diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/OpenLinks.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/OpenLinks.java index a9404e57..0819fb1f 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/OpenLinks.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/OpenLinks.java @@ -15,9 +15,9 @@ public class OpenLinks { private static final Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; - enum Link { + public static enum Link { FAQ("http://bwlehrpool.hs-offenburg.de"), - VMWARE("https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0|PLAYER-603|product_downloads"), + VMWARE("https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0%7CPLAYER-603%7Cproduct_downloads"), INTRO("http://www.hs-offenburg.de/fileadmin/Einrichtungen/hrz/Projekte/bwLehrpool/3_bwLehrpool_-_Image_einbinden_und_starten.pdf"); private final URI uri; -- cgit v1.2.3-55-g7522