summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-07-27 17:55:01 +0200
committerSimon Rettberg2015-07-27 17:55:01 +0200
commit6b08a731c29eb47f0b2e999d45dded76703af85b (patch)
treed5072a87b20dfb2a9737e262594c915b99727649 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java
parent[client] Transformed MainWindow (diff)
downloadtutor-module-6b08a731c29eb47f0b2e999d45dded76703af85b.tar.gz
tutor-module-6b08a731c29eb47f0b2e999d45dded76703af85b.tar.xz
tutor-module-6b08a731c29eb47f0b2e999d45dded76703af85b.zip
[client] Moar Swing
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java49
1 files changed, 22 insertions, 27 deletions
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 dab012d3..ab1d9327 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
@@ -1,36 +1,31 @@
package org.openslx.dozmod.gui.window.layout;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
+import java.awt.Button;
+import java.awt.Composite;
+import java.awt.GridLayout;
+import java.awt.Label;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+
import org.openslx.dozmod.gui.Gui;
-public abstract class VirtualizerNoticeWindowLayout extends Composite {
- private final String title = "Hinweis VMWare Player";
- private final String infoText = "Für die Arbeit mit der bwLehrpool Suite wird zwingend ein VMWare Player benötigt. "
+public abstract class VirtualizerNoticeWindowLayout extends JDialog {
+ private static final String title = "Hinweis VMWare Player";
+ private static final String infoText = "Für die Arbeit mit der bwLehrpool Suite wird zwingend ein VMWare Player benötigt. "
+ "Diesen können Sie sich unter folgendem Link kostenfrei downloaden. "
+ "Wenn Sie bereits den VMWare Player oder die VMWare Workstation installiert haben, können Sie diesen Hinweis ignorieren.";
private final String infoTitle = "bwLehrpool Suite";
- protected Button windowsDLButton;
- protected Button linuxDLButton;
- protected Button readCheck;
- protected Button continueButton;
-
- public VirtualizerNoticeWindowLayout(final Shell mainShell) {
- super(mainShell, SWT.NONE);
+ protected JButton windowsDLButton;
+ protected JButton linuxDLButton;
+ protected JButton readCheck;
+ protected JButton continueButton;
- // set the title of the bar.
- mainShell.setText(title);
+ public VirtualizerNoticeWindowLayout(boolean modal) {
+ super(null, title, modal ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS);
// layout for this composite
this.setLayout(new GridLayout(1, false));
@@ -39,14 +34,14 @@ public abstract class VirtualizerNoticeWindowLayout extends Composite {
this.setLayoutData(gd);
// bold title at start.
- Label titleLabel = new Label(this, SWT.NONE);
+ JLabel titleLabel = new JLabel(this, SWT.NONE);
titleLabel.setText(infoTitle);
- FontData fontData = titleLabel.getFont().getFontData()[0];
- final Font font = new Font(Gui.display, new FontData(fontData.getName(), fontData.getHeight(), SWT.BOLD));
+ JFontData fontData = titleLabel.getFont().getFontData()[0];
+ final JFont font = new JFont(Gui.display, new FontData(fontData.getName(), fontData.getHeight(), SWT.BOLD));
titleLabel.setFont(font);
// infotext
- Label infoLabel = new Label(this, SWT.NONE | SWT.WRAP);
+ JLabel infoLabel = new JLabel(this, SWT.NONE | SWT.WRAP);
infoLabel.setText(infoText);
infoLabel.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));