diff options
author | Stephan Schwaer | 2015-08-31 17:28:42 +0200 |
---|---|---|
committer | Stephan Schwaer | 2015-08-31 17:28:42 +0200 |
commit | 893d0b2057e94461bf6ac6ebb14e238dbc3f7010 (patch) | |
tree | fc00b1512f66afaeb68a3977e7a0a9dc52f5f32a /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java | |
parent | [client] slightly improved user info message when deleting a basis image in I... (diff) | |
download | tutor-module-893d0b2057e94461bf6ac6ebb14e238dbc3f7010.tar.gz tutor-module-893d0b2057e94461bf6ac6ebb14e238dbc3f7010.tar.xz tutor-module-893d0b2057e94461bf6ac6ebb14e238dbc3f7010.zip |
[client] several layout fixes, added some comments.
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 | 40 |
1 files changed, 23 insertions, 17 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 7e4abcd0..6e1574e1 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,29 +1,28 @@ package org.openslx.dozmod.gui.window.layout; -import java.awt.BorderLayout; -import java.awt.Container; import java.awt.Dimension; -import java.awt.Font; import java.awt.Frame; +import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JDialog; +import javax.swing.JLabel; import javax.swing.JPanel; -import org.openslx.dozmod.gui.control.QLabel; +import org.openslx.dozmod.gui.helper.GridManager; +@SuppressWarnings("serial") public abstract class VirtualizerNoticeWindowLayout extends JDialog { private static final String title = "Hinweis VMWare Player"; private static final String infoText = "<html><body style='width:100%'>" + "Für die Arbeit mit der bwLehrpool Suite wird zwingend der <b>VMWare Player</b> benötigt. " - + "Diesen können Sie sich unter folgendem Link kostenfrei downloaden. " + + "Diesen können Sie sich unter folgendem Link kostenfrei herunterladen. " + "Wenn Sie bereits den VMWare Player oder die VMWare Workstation installiert haben, können Sie diesen Hinweis ignorieren." + "</body></html>"; - private final static String infoTitle = "bwLehrpool Suite"; protected JButton windowsDLButton; protected JButton linuxDLButton; @@ -33,17 +32,18 @@ public abstract class VirtualizerNoticeWindowLayout extends JDialog { public VirtualizerNoticeWindowLayout(Frame modalParent) { super(modalParent, title, modalParent != null ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS); + JPanel contentPanel = new JPanel(); + contentPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + add(contentPanel); + + GridManager grid = new GridManager(contentPanel, 1); + JPanel infoPane = new JPanel(); infoPane.setLayout(new BoxLayout(infoPane, BoxLayout.PAGE_AXIS)); - // bold title at start. - QLabel titleLabel = new QLabel(infoTitle); - final Font font = titleLabel.getFont().deriveFont(Font.BOLD); - titleLabel.setFont(font); - infoPane.add(titleLabel); - // infotext - QLabel infoLabel = new QLabel(infoText); + JLabel infoLabel = new JLabel(infoText); + infoLabel.setBorder(BorderFactory.createTitledBorder("Hinweis")); infoPane.add(infoLabel); // Spacing @@ -67,11 +67,17 @@ public abstract class VirtualizerNoticeWindowLayout extends JDialog { continueButton = new JButton("Schließen"); bottomPane.add(continueButton); - final Container content = getContentPane(); - content.add(infoPane, BorderLayout.CENTER); - content.add(bottomPane, BorderLayout.PAGE_END); + grid.add(infoPane).fill(true, true).expand(true, true); + grid.nextRow(); + grid.skip().fill(true, true).expand(true, true); + grid.nextRow(); + grid.add(bottomPane).fill(true, false).expand(true, false); + grid.nextRow(); + grid.finish(false); + - setSize(new Dimension(600, 700)); + setSize(new Dimension(600, 250)); + setLocationRelativeTo(modalParent); validate(); } |