diff options
author | Simon Rettberg | 2015-07-08 19:39:35 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-07-08 19:39:35 +0200 |
commit | 8d6cd17c330388aa13fd7c39802c7400d85f972c (patch) | |
tree | 5f2c5856f58b1454e24dc16fad10751dfe9d087b /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java | |
parent | oops (diff) | |
download | tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.tar.gz tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.tar.xz tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.zip |
[client] Redo package structure, add comments/TODOs, rename GUI classes
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.java | 82 |
1 files changed, 82 insertions, 0 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 new file mode 100644 index 00000000..bec2dc44 --- /dev/null +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java @@ -0,0 +1,82 @@ +package org.openslx.dozmod.gui.window.layout; + +import org.eclipse.swt.SWT; +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 org.openslx.dozmod.gui.helper.GuiManager; + +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. " + + "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); + + // set the title of the bar. + mainShell.setText(title); + + // layout for this composite + this.setLayout(new GridLayout(1, false)); + + // bold title at start. + Label titleLabel = new Label(this, SWT.NONE); + titleLabel.setText(infoTitle); + FontData fontData = titleLabel.getFont().getFontData()[0]; + Font font = new Font(GuiManager.getDisplay(), new FontData(fontData.getName(), fontData.getHeight(), + SWT.BOLD)); + titleLabel.setFont(font); + // TODO dispose of font? + + // infotext + Label infoLabel = new Label(this, SWT.NONE | SWT.WRAP); + infoLabel.setText(infoText); + GridData gridData = new GridData(GridData.FILL, GridData.BEGINNING, true, false); + infoLabel.setLayoutData(gridData); + + // composite for the windows vmware-download button + Composite windowsComposite = new Composite(this, SWT.NONE); + windowsComposite.setLayout(new GridLayout()); + gridData = new GridData(GridData.FILL, GridData.BEGINNING, true, false); + windowsComposite.setLayoutData(gridData); + + new Label(windowsComposite, SWT.NONE).setText("Windows:"); + windowsDLButton = new Button(windowsComposite, SWT.PUSH); + windowsDLButton.setText("VMWare Player Herunterladen"); + + // composite for the linux vmware-download button + Composite linuxComposite = new Composite(this, SWT.NONE); + linuxComposite.setLayout(new GridLayout()); + gridData = new GridData(GridData.FILL, GridData.BEGINNING, true, false); + linuxComposite.setLayoutData(gridData); + + new Label(windowsComposite, SWT.NONE).setText("Linux:"); + linuxDLButton = new Button(windowsComposite, SWT.PUSH); + linuxDLButton.setText("VMWare Player Herunterladen"); + + readCheck = new Button(this, SWT.CHECK); + readCheck.setText("Diese Benachrichtigung nicht mehr anzeigen."); + gridData = new GridData(GridData.BEGINNING, GridData.END, false, false); + readCheck.setLayoutData(gridData); + + continueButton = new Button(this, SWT.PUSH); + continueButton.setText("Weiter"); + gridData = new GridData(GridData.BEGINNING, GridData.END, false, false); + continueButton.setLayoutData(gridData); + + } +}
\ No newline at end of file |