summaryrefslogtreecommitdiffstats
path: root/dozentenmodul
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-28 11:49:27 +0200
committerSimon Rettberg2015-08-28 11:49:27 +0200
commit977bf235b960e591f5706a02f89a0a79581c4959 (patch)
tree71fca2d0168a80f5db6ec05f938f6ee52322cdb3 /dozentenmodul
parent[client] Apply default exception handler only to AWT thread (diff)
downloadtutor-module-977bf235b960e591f5706a02f89a0a79581c4959.tar.gz
tutor-module-977bf235b960e591f5706a02f89a0a79581c4959.tar.xz
tutor-module-977bf235b960e591f5706a02f89a0a79581c4959.zip
[client] Don't render HTML where it's not required
Diffstat (limited to 'dozentenmodul')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/App.java6
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java4
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java22
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ComboBox.java44
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java4
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/QLabel.java36
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/DisclaimerWindowLayout.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java38
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java6
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java48
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java8
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java10
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java3
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java6
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java13
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java6
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java9
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java10
22 files changed, 169 insertions, 127 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
index 6c22f244..0e64b0a6 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
@@ -1,11 +1,12 @@
package org.openslx.dozmod;
import java.awt.AWTEvent;
+import java.awt.Component;
import java.awt.Font;
import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
-import java.awt.event.ComponentEvent;
import java.awt.event.ContainerEvent;
+import java.awt.event.WindowEvent;
import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
@@ -15,6 +16,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.net.ssl.SSLContext;
+import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
@@ -201,7 +203,7 @@ public class App {
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
@Override
public void eventDispatched(AWTEvent event) {
- if (event instanceof ContainerEvent && event instanceof ComponentEvent) {
+ if (event instanceof ContainerEvent) {
ContainerEvent containerEvent = (ContainerEvent) event;
if (containerEvent.getID() == ContainerEvent.COMPONENT_ADDED) {
Font font = containerEvent.getChild().getFont();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
index 166ccdd7..bd6775a7 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
@@ -18,7 +18,6 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
@@ -37,6 +36,7 @@ import org.openslx.dozmod.gui.Gui.GuiCallable;
import org.openslx.dozmod.gui.activity.ActivityPanel;
import org.openslx.dozmod.gui.activity.DownloadPanel;
import org.openslx.dozmod.gui.activity.UploadPanel;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.DebugWindow;
import org.openslx.dozmod.gui.helper.MessageType;
@@ -335,7 +335,7 @@ public abstract class MainWindow {
cascadeAboutMenu.add(virtualizerNoticeItem);
menuBar.add(Box.createHorizontalGlue());
- final JLabel memStats = new JLabel();
+ final QLabel memStats = new QLabel();
menuBar.add(memStats);
// Define actions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java
index 059f45e6..96171e6d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/TransferPanel.java
@@ -9,7 +9,6 @@ import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import org.openslx.dozmod.filetransfer.TransferEvent;
@@ -17,17 +16,18 @@ import org.openslx.dozmod.filetransfer.TransferEventListener;
import org.openslx.dozmod.filetransfer.TransferTask;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.BlockProgressBar;
+import org.openslx.dozmod.gui.control.QLabel;
@SuppressWarnings("serial")
public abstract class TransferPanel extends ActivityPanel implements TransferEventListener {
- protected final JLabel lblStatus;
+ protected final QLabel lblStatus;
- protected final JLabel lblError;
+ protected final QLabel lblError;
- protected final JLabel lblSpeed;
+ protected final QLabel lblSpeed;
- protected final JLabel lblRemaining;
+ protected final QLabel lblRemaining;
protected final JButton btnClose;
@@ -47,14 +47,14 @@ public abstract class TransferPanel extends ActivityPanel implements TransferEve
// Header: [status] VM-Name ---- fileName [Button]
JPanel header = new JPanel();
header.setLayout(new BoxLayout(header, BoxLayout.LINE_AXIS));
- lblStatus = new JLabel("[init]");
+ lblStatus = new QLabel("[init]");
header.add(lblStatus);
header.add(Box.createHorizontalStrut(10));
- JLabel vmName = new JLabel(displayName);
+ QLabel vmName = new QLabel(displayName);
vmName.setFont(vmName.getFont().deriveFont(Font.BOLD));
header.add(vmName);
header.add(Box.createHorizontalGlue());
- header.add(new JLabel(fileName));
+ header.add(new QLabel(fileName));
header.add(Box.createHorizontalStrut(10));
btnClose = new JButton("Abbrechen");
header.add(btnClose);
@@ -70,9 +70,9 @@ public abstract class TransferPanel extends ActivityPanel implements TransferEve
// Speed & error
JPanel footer = new JPanel();
footer.setLayout(new BoxLayout(footer, BoxLayout.LINE_AXIS));
- lblError = new JLabel();
- lblSpeed = new JLabel("-");
- lblRemaining = new JLabel("-");
+ lblError = new QLabel();
+ lblSpeed = new QLabel("-");
+ lblRemaining = new QLabel("-");
lblSpeed.setMinimumSize(new Dimension(50, 0));
lblRemaining.setMinimumSize(new Dimension(60, 0));
footer.add(lblError);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ComboBox.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ComboBox.java
index 2badce86..2dddd48e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ComboBox.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ComboBox.java
@@ -72,6 +72,8 @@ public class ComboBox<T> extends JComboBox<T> {
final ListCellRenderer<? super T> oldRenderer = super.getRenderer();
if (oldRenderer instanceof JLabel) {
// The default JComboBox renderer always seems to be a subclass of JLabel, which is nice
+ ((JLabel) oldRenderer).putClientProperty("html.disable", Boolean.TRUE);
+ ((JLabel) oldRenderer).putClientProperty("html", null);
super.setRenderer(new ListCellRenderer<T>() {
@Override
public Component getListCellRendererComponent(JList<? extends T> list, T value,
@@ -91,25 +93,31 @@ public class ComboBox<T> extends JComboBox<T> {
});
} else {
// Fallback, in case there's any platform, L&F, runtime environment or whatnot where it's not a JLabel
- super.setRenderer(new DefaultListCellRenderer() {
- @SuppressWarnings("unchecked")
- @Override
- public Component getListCellRendererComponent(JList<?> list, Object value, int index,
- boolean isSelected, boolean cellHasFocus) {
- if (me.getModel().getSize() == 0) {
- value = itemRenderer.getEmptyText();
- } else {
- try {
- value = itemRenderer.renderItem((T) value);
- } catch (ClassCastException e) {
- // Should never happen; do nothing, retain original value
- }
- }
- return super.getListCellRendererComponent(list, value, index, isSelected,
- cellHasFocus);
- }
- });
+ super.setRenderer(new FallbackCellRenderer());
+ }
+ }
+ }
+
+ private class FallbackCellRenderer extends DefaultListCellRenderer {
+ public FallbackCellRenderer() {
+ putClientProperty("html.disable", Boolean.TRUE);
+ putClientProperty("html", null);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Component getListCellRendererComponent(JList<?> list, Object value, int index,
+ boolean isSelected, boolean cellHasFocus) {
+ if (me.getModel().getSize() == 0) {
+ value = itemRenderer.getEmptyText();
+ } else {
+ try {
+ value = itemRenderer.renderItem((T) value);
+ } catch (ClassCastException e) {
+ // Should never happen; do nothing, retain original value
+ }
}
+ return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
}
}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java
index 02927ab2..97bb20c7 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/ImageListViewer.java
@@ -10,7 +10,6 @@ import java.util.regex.PatternSyntaxException;
import javax.swing.BoxLayout;
import javax.swing.JComboBox;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
@@ -27,7 +26,6 @@ import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.table.ImageTable;
import org.openslx.dozmod.gui.control.table.ListTable.ListModel;
import org.openslx.dozmod.gui.helper.GridManager;
-import org.openslx.dozmod.gui.window.layout.ImageListWindowLayout;
import org.openslx.dozmod.permissions.ImagePerms;
import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.cache.ImageCache;
@@ -36,7 +34,7 @@ import org.openslx.util.QuickTimer;
import org.openslx.util.QuickTimer.Task;
@SuppressWarnings("serial")
-public class ImageListViewer extends JLabel {
+public class ImageListViewer extends QLabel {
private final static Logger LOGGER = Logger.getLogger(ImageListViewer.class);
protected JTextField searchTextField;
protected ImageTable imageTable;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java
index 511e0c7f..a0071824 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/PersonLabel.java
@@ -6,7 +6,6 @@ import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import javax.swing.JLabel;
import javax.swing.UIManager;
import org.openslx.bwlp.thrift.iface.UserInfo;
@@ -19,7 +18,7 @@ import org.openslx.dozmod.util.OpenLinks;
* for when the users clicks the label.
*/
@SuppressWarnings("serial")
-public class PersonLabel extends JLabel {
+public class PersonLabel extends QLabel {
private UserInfo user = null;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/QLabel.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/QLabel.java
new file mode 100644
index 00000000..527c0954
--- /dev/null
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/QLabel.java
@@ -0,0 +1,36 @@
+package org.openslx.dozmod.gui.control;
+
+import javax.swing.Icon;
+import javax.swing.JLabel;
+
+public class QLabel extends JLabel {
+
+ private static final long serialVersionUID = -2454459023556745689L;
+
+ public QLabel(String text, Icon icon, int horizontalAlignment) {
+ super(text, icon, horizontalAlignment);
+ putClientProperty("html.disable", Boolean.TRUE);
+ putClientProperty("html", null);
+ }
+
+ public QLabel(String text, int horizontalAlignment) {
+ this(text, null, horizontalAlignment);
+ }
+
+ public QLabel(String text) {
+ this(text, null, LEADING);
+ }
+
+ public QLabel(Icon image, int horizontalAlignment) {
+ this(null, image, horizontalAlignment);
+ }
+
+ public QLabel(Icon image) {
+ this(null, image, CENTER);
+ }
+
+ public QLabel() {
+ this("", null, LEADING);
+ }
+
+}
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java
index f1c63889..ca0fbca3 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/ListTable.java
@@ -278,6 +278,11 @@ public abstract class ListTable<T> extends JTable {
*
*/
private class ListTableRenderer extends DefaultTableCellRenderer {
+ public ListTableRenderer() {
+ putClientProperty("html.disable", Boolean.TRUE);
+ putClientProperty("html", null);
+ }
+
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column) {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
index 5d52b5fe..34984bdf 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
@@ -14,7 +14,6 @@ import java.util.Map;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
@@ -36,8 +35,8 @@ import org.openslx.dozmod.gui.helper.PopupMenu;
import org.openslx.dozmod.gui.helper.UiFeedback;
import org.openslx.dozmod.gui.window.UserListWindow.UserAddedCallback;
import org.openslx.dozmod.gui.window.layout.ImageDetailsWindowLayout;
-import org.openslx.dozmod.gui.wizard.LectureWizard;
import org.openslx.dozmod.gui.wizard.ImageUpdateWizard;
+import org.openslx.dozmod.gui.wizard.LectureWizard;
import org.openslx.dozmod.permissions.ImagePerms;
import org.openslx.dozmod.permissions.PermissionDefaultToCustomLink;
import org.openslx.dozmod.thrift.Session;
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/DisclaimerWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/DisclaimerWindowLayout.java
index 47c027b0..94928b4a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/DisclaimerWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/DisclaimerWindowLayout.java
@@ -8,11 +8,12 @@ import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
+import org.openslx.dozmod.gui.control.QLabel;
+
public abstract class DisclaimerWindowLayout extends JDialog {
protected String notice = "Bitte lesen und bestätigen Sie folgende rechtliche Hinweise";
@@ -44,7 +45,7 @@ public abstract class DisclaimerWindowLayout extends JDialog {
// information before the disclaimer
// the group
- JLabel noticePanel = new JLabel();
+ QLabel noticePanel = new QLabel();
noticePanel.setBorder(BorderFactory.createTitledBorder(noticeLabel));
noticePanel.setText(notice);
add(noticePanel, BorderLayout.NORTH);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java
index 53ae6b4a..1ac18ba9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageDetailsWindowLayout.java
@@ -14,7 +14,6 @@ import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
@@ -26,6 +25,7 @@ import org.openslx.bwlp.thrift.iface.ShareMode;
import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
import org.openslx.dozmod.gui.control.PersonLabel;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.ImageVersionTable;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.thrifthelper.Comparators;
@@ -38,12 +38,12 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
protected final PersonLabel lblOwner;
protected final JButton btnChangeOwner;
- protected final JLabel lblCreateTime;
+ protected final QLabel lblCreateTime;
protected final PersonLabel lblUpdater;
- protected final JLabel lblUpdateTime;
+ protected final QLabel lblUpdateTime;
protected final JComboBox<OperatingSystem> cboOperatingSystem;
- protected final JLabel lblVirtualizer;
+ protected final QLabel lblVirtualizer;
protected final JTextField txtTags;
protected final JCheckBox chkIsTemplate;
protected final JComboBox<ShareMode> cboShareMode;
@@ -87,7 +87,7 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
txtDescription.setLineWrap(true);
txtDescription.setWrapStyleWord(true);
txtDescription.setMinimumSize(new Dimension(0, 100));
- grid.add(new JLabel("Beschreibung")).anchor = GridBagConstraints.FIRST_LINE_START;
+ grid.add(new QLabel("Beschreibung")).anchor = GridBagConstraints.FIRST_LINE_START;
grid.add(
new JScrollPane(txtDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER), 2)
@@ -98,26 +98,26 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
// owner
lblOwner = new PersonLabel();
btnChangeOwner = new JButton("Ändern");
- grid.add(new JLabel("Besitzer"));
+ grid.add(new QLabel("Besitzer"));
grid.add(lblOwner).expand(true, false);
grid.add(btnChangeOwner);
grid.nextRow();
// creation time
- lblCreateTime = new JLabel();
- grid.add(new JLabel("Erstellt"));
+ lblCreateTime = new QLabel();
+ grid.add(new QLabel("Erstellt"));
grid.add(lblCreateTime, 2);
grid.nextRow();
// last updater
lblUpdater = new PersonLabel();
- grid.add(new JLabel("Geändert durch"));
+ grid.add(new QLabel("Geändert durch"));
grid.add(lblUpdater, 2);
grid.nextRow();
// last updated
- lblUpdateTime = new JLabel();
- grid.add(new JLabel("Änderungszeitpunkt"));
+ lblUpdateTime = new QLabel();
+ grid.add(new QLabel("Änderungszeitpunkt"));
grid.add(lblUpdateTime, 2);
grid.nextRow();
@@ -133,27 +133,27 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
});
cboOperatingSystem.setEditable(false);
- grid.add(new JLabel("Betriebssystem"));
+ grid.add(new QLabel("Betriebssystem"));
grid.add(cboOperatingSystem, 2).expand(true, false).fill(true, false);
grid.nextRow();
// virtualizer
- lblVirtualizer = new JLabel();
- grid.add(new JLabel("Virtualisierer"));
+ lblVirtualizer = new QLabel();
+ grid.add(new QLabel("Virtualisierer"));
grid.add(lblVirtualizer, 2);
grid.nextRow();
// tags
txtTags = new JTextField();
/* TODO
- grid.add(new JLabel("Tags"), GridPos.get(0, row, false, false));
+ grid.add(new QLabel("Tags"), GridPos.get(0, row, false, false));
grid.add(txtTags, GridPos.get(1, row++, true, false));
grid.nextRow();
*/
// share mode
cboShareMode = new JComboBox<>();
- grid.add(new JLabel("Freigabemodus"));
+ grid.add(new QLabel("Freigabemodus"));
grid.add(cboShareMode, 2).expand(true, false).fill(true, false);
grid.nextRow();
@@ -165,14 +165,14 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
// version
txtVersion = new JTextField();
- grid.add(new JLabel("Versions-UUID"));
+ grid.add(new QLabel("Versions-UUID"));
grid.add(txtVersion, 2).expand(true, false).fill(true, false);
grid.nextRow();
// id
txtId = new JTextField();
txtId.setEditable(false);
- grid.add(new JLabel("Image-UUID"));
+ grid.add(new QLabel("Image-UUID"));
grid.add(txtId, 2).expand(true, false).fill(true, false);
grid.nextRow();
@@ -205,7 +205,7 @@ public abstract class ImageDetailsWindowLayout extends JDialog {
JPanel versionTablePanel = new JPanel();
versionTablePanel.setLayout(new BorderLayout());
versionTablePanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
- JLabel lblVersion = new JLabel("Image Versionen");
+ QLabel lblVersion = new QLabel("Image Versionen");
lblVersion.setFont(lblVersion.getFont().deriveFont(Font.BOLD));
versionTablePanel.add(lblVersion, BorderLayout.PAGE_START);
versionTable = new ImageVersionTable();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
index a59a93ae..f97cec5f 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java
@@ -8,11 +8,11 @@ import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import org.apache.log4j.Logger;
import org.openslx.dozmod.gui.control.ImageListViewer;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.CompositePage;
@@ -46,9 +46,9 @@ public abstract class ImageListWindowLayout extends CompositePage {
// --------------------------------------
// Info panel on the top with a search box
JPanel infoPanel = new JPanel(new BorderLayout());
- JLabel infoTitle = new JLabel(infoTitleString);
+ QLabel infoTitle = new QLabel(infoTitleString);
infoTitle.setFont(infoTitle.getFont().deriveFont(Font.BOLD));
- JLabel infoText = new JLabel(infoTextString);
+ QLabel infoText = new QLabel(infoTextString);
infoPanel.add(infoTitle, BorderLayout.NORTH);
infoPanel.add(infoText, BorderLayout.CENTER);
add(infoPanel, BorderLayout.NORTH);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java
index e62c4c1c..5e736426 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureDetailsWindowLayout.java
@@ -18,7 +18,6 @@ import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
@@ -34,6 +33,7 @@ import org.openslx.bwlp.thrift.iface.ImageVersionDetails;
import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
import org.openslx.dozmod.gui.control.PersonLabel;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.util.DateLabelFormatter;
import org.openslx.dozmod.util.FormatHelper;
@@ -44,15 +44,15 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
protected final JTextArea txtTitle;
protected final JTextArea txtDescription;
- protected final JLabel txtImageName;
+ protected final QLabel txtImageName;
protected final JButton btnLinkImage;
protected final PersonLabel lblOwner;
protected final JButton btnChangeOwner;
- protected final JLabel lblCreateTime;
+ protected final QLabel lblCreateTime;
protected final PersonLabel lblUpdater;
- protected final JLabel lblUpdateTime;
- protected final JLabel lblStartTime;
- protected final JLabel lblEndTime;
+ protected final QLabel lblUpdateTime;
+ protected final QLabel lblStartTime;
+ protected final QLabel lblEndTime;
protected final JCheckBox btnAutoUpdate;
protected final JComboBox<ImageVersionDetails> cboVersions;
protected final JCheckBox btnIsExam;
@@ -60,7 +60,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
protected final JCheckBox btnIsActive;
protected final JTextField txtId;
- protected final JLabel lblUseCount;
+ protected final QLabel lblUseCount;
protected final JButton btnPermissions;
@@ -107,14 +107,14 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
txtDescription = new JTextArea();
txtDescription.setLineWrap(true);
txtDescription.setPreferredSize(new Dimension(450, 100));
- grid.add(new JLabel("Beschreibung")).anchor(GridBagConstraints.FIRST_LINE_START);
+ grid.add(new QLabel("Beschreibung")).anchor(GridBagConstraints.FIRST_LINE_START);
grid.add(new JScrollPane(txtDescription), 2).expand(true, true).fill(true, true);
grid.nextRow();
// linked image
// name
- txtImageName = new JLabel();
- grid.add(new JLabel("Verknüpftes Image"));
+ txtImageName = new QLabel();
+ grid.add(new QLabel("Verknüpftes Image"));
grid.add(txtImageName).expand(true, false);
// link button for image
btnLinkImage = new JButton("Ändern");
@@ -144,7 +144,7 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
versionPanel.add(btnDownloadImage, BorderLayout.EAST);
versionPanel.add(cboVersions, BorderLayout.CENTER);
versionPanel.add(btnAutoUpdate, BorderLayout.SOUTH);
- grid.add(new JLabel("Image-Version"));
+ grid.add(new QLabel("Image-Version"));
grid.add(versionPanel, 2);
grid.nextRow();
@@ -155,8 +155,8 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
startTime = makeTimeSpinner(23, 59);
startTimePanel.add(startDate, BorderLayout.WEST);
startTimePanel.add(startTime, BorderLayout.CENTER);
- lblStartTime = new JLabel();
- grid.add(new JLabel("Startdatum"));
+ lblStartTime = new QLabel();
+ grid.add(new QLabel("Startdatum"));
grid.add(startTimePanel, 2);
grid.nextRow();
@@ -167,34 +167,34 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
endTime = makeTimeSpinner(00, 59);
endTimePanel.add(endDate, BorderLayout.WEST);
endTimePanel.add(endTime, BorderLayout.CENTER);
- lblEndTime = new JLabel();
- grid.add(new JLabel("Enddatum"));
+ lblEndTime = new QLabel();
+ grid.add(new QLabel("Enddatum"));
grid.add(endTimePanel, 2);
grid.nextRow();
// owner
lblOwner = new PersonLabel();
btnChangeOwner = new JButton("Ändern");
- grid.add(new JLabel("Besitzer"));
+ grid.add(new QLabel("Besitzer"));
grid.add(lblOwner).expand(true, false);
grid.add(btnChangeOwner);
grid.nextRow();
// creation time
- lblCreateTime = new JLabel();
- grid.add(new JLabel("Erstellt"));
+ lblCreateTime = new QLabel();
+ grid.add(new QLabel("Erstellt"));
grid.add(lblCreateTime, 2);
grid.nextRow();
// last updater
lblUpdater = new PersonLabel();
- grid.add(new JLabel("Geändert durch"));
+ grid.add(new QLabel("Geändert durch"));
grid.add(lblUpdater, 2);
grid.nextRow();
// last updated
- lblUpdateTime = new JLabel();
- grid.add(new JLabel("Änderungszeitpunkt"));
+ lblUpdateTime = new QLabel();
+ grid.add(new QLabel("Änderungszeitpunkt"));
grid.add(lblUpdateTime, 2);
grid.nextRow();
@@ -217,13 +217,13 @@ public abstract class LectureDetailsWindowLayout extends JDialog {
// id
txtId = new JTextField();
txtId.setEditable(false);
- grid.add(new JLabel("ID"));
+ grid.add(new QLabel("ID"));
grid.add(txtId, 2).expand(true, false).fill(true, false);
grid.nextRow();
// use count
- lblUseCount = new JLabel();
- grid.add(new JLabel("Aufrufe"));
+ lblUseCount = new QLabel();
+ grid.add(new QLabel("Aufrufe"));
grid.add(lblUseCount, 2);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
index 2993b8e9..b7104ece 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LectureListWindowLayout.java
@@ -8,12 +8,12 @@ import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.LectureTable;
import org.openslx.dozmod.gui.helper.CompositePage;
import org.openslx.dozmod.gui.helper.GridPos;
@@ -60,10 +60,10 @@ public abstract class LectureListWindowLayout extends CompositePage {
JPanel infoComposite = new JPanel();
infoComposite.setLayout(new BoxLayout(infoComposite, BoxLayout.PAGE_AXIS));
// title of the info group in bold
- JLabel infoTitle = new JLabel(infoTitleString);
+ QLabel infoTitle = new QLabel(infoTitleString);
infoTitle.setFont(infoTitle.getFont().deriveFont(Font.BOLD));
// the infotext
- JLabel infoText = new JLabel(infoTextString);
+ QLabel infoText = new QLabel(infoTextString);
infoComposite.add(infoTitle);
infoComposite.add(infoText);
// -- end group of title --
@@ -110,7 +110,7 @@ public abstract class LectureListWindowLayout extends CompositePage {
}
public JTextField createCaptionAndTextfield(String captionString, JPanel group, int row) {
- JLabel caption = new JLabel(captionString);
+ QLabel caption = new QLabel(captionString);
JTextField textField = new JTextField();
textField.setEditable(false);
caption.setText(captionString);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
index 5472ea42..2d38201d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java
@@ -10,7 +10,6 @@ import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
@@ -22,6 +21,7 @@ import org.openslx.bwlp.thrift.iface.Organization;
import org.openslx.dozmod.gui.Gui;
import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.util.ResourceLoader;
@@ -72,7 +72,7 @@ public abstract class LoginWindowLayout extends JDialog {
GridManager grid = new GridManager(this, 2);
- grid.add(new JLabel(getScaledLogo()), 2);
+ grid.add(new QLabel(getScaledLogo()), 2);
grid.nextRow();
loginTypes[0] = new JRadioButton("Authentifizierung über bwIDM");
@@ -112,17 +112,17 @@ public abstract class LoginWindowLayout extends JDialog {
loginFormPanel.setBorder(new TitledBorder(LOGIN_FORM_LABEL));
GridManager grid = new GridManager(loginFormPanel, 2);
- grid.add(new JLabel("Identity Provider"));
+ grid.add(new QLabel("Identity Provider"));
grid.add(idpCombo).expand(true, false).fill(true, false);
grid.nextRow();
// label + field for username
- grid.add(new JLabel("Benutzername"));
+ grid.add(new QLabel("Benutzername"));
grid.add(usernameField).expand(true, false).fill(true, false);
grid.nextRow();
// label + field for password
- grid.add(new JLabel("Passwort"));
+ grid.add(new QLabel("Passwort"));
grid.add(passwordField).expand(true, false).fill(true, false);
grid.nextRow();
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java
index c2172aea..79c3cb3a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/MainMenuWindowLayout.java
@@ -40,8 +40,7 @@ public abstract class MainMenuWindowLayout extends CompositePage {
protected String vmInfo = "<html><b>Übersicht Virtuelle Maschinen</b><br>"
+ "Zur Übersicht über die verfügbaren Virtuellen Maschinen wechseln. Hier können Sie<br><br>"
+ "1) Veranstaltungen auf Basis einer Virtuellen Maschine erstellen<br>"
- + "2) Neue Virtuelle Maschinen hochladen<br>"
- + "3) Virtuelle Maschinen herunterladen<br>"
+ + "2) Neue Virtuelle Maschinen hochladen<br>" + "3) Virtuelle Maschinen herunterladen<br>"
+ "4) Virtuelle Maschinen bearbeiten und löschen</html>";
// text for the info for the lecture selection
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java
index 03b7d700..e9b6b529 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/UserListWindowLayout.java
@@ -3,7 +3,6 @@ package org.openslx.dozmod.gui.window.layout;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
-import java.awt.Frame;
import java.awt.GridBagLayout;
import java.awt.Window;
@@ -12,13 +11,12 @@ import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import org.apache.log4j.Logger;
-import org.openslx.bwlp.thrift.iface.UserInfo;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.control.table.UserTable;
import org.openslx.dozmod.gui.helper.GridPos;
@@ -70,7 +68,7 @@ public class UserListWindowLayout extends JDialog {
JPanel filterPanel = new JPanel(new GridBagLayout());
searchUserField = new JTextField();
filterPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
- filterPanel.add(new JLabel("Suchen: "), GridPos.get(0, 0, false, false));
+ filterPanel.add(new QLabel("Suchen: "), GridPos.get(0, 0, false, false));
filterPanel.add(searchUserField, GridPos.get(1, 0, true, true));
// pack it all
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 07a55ba4..7e4abcd0 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
@@ -11,9 +11,10 @@ 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;
+
public abstract class VirtualizerNoticeWindowLayout extends JDialog {
private static final String title = "Hinweis VMWare Player";
private static final String infoText = "<html><body style='width:100%'>"
@@ -36,13 +37,13 @@ public abstract class VirtualizerNoticeWindowLayout extends JDialog {
infoPane.setLayout(new BoxLayout(infoPane, BoxLayout.PAGE_AXIS));
// bold title at start.
- JLabel titleLabel = new JLabel(infoTitle);
+ QLabel titleLabel = new QLabel(infoTitle);
final Font font = titleLabel.getFont().deriveFont(Font.BOLD);
titleLabel.setFont(font);
infoPane.add(titleLabel);
// infotext
- JLabel infoLabel = new JLabel(infoText);
+ QLabel infoLabel = new QLabel(infoText);
infoPane.add(infoLabel);
// Spacing
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java
index c86e384d..2ba24604 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java
@@ -10,24 +10,21 @@ import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
-import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
-import javax.swing.UIManager;
import org.apache.log4j.Logger;
import org.openslx.dozmod.gui.Gui;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
@SuppressWarnings("serial")
@@ -35,8 +32,8 @@ public abstract class Wizard extends JDialog {
private static final Logger LOGGER = Logger.getLogger(Wizard.class);
- private final JLabel titleLabel;
- private final JLabel messageLabel;
+ private final QLabel titleLabel;
+ private final QLabel messageLabel;
private final List<WizardPage> pages = new ArrayList<>();
private final JPanel contentPanel;
private int currentPage = -1;
@@ -58,8 +55,8 @@ public abstract class Wizard extends JDialog {
header.setLayout(new BoxLayout(header, BoxLayout.PAGE_AXIS));
header.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
// Labels in header
- titleLabel = new JLabel("<title>");
- messageLabel = new JLabel("<message>");
+ titleLabel = new QLabel("<title>");
+ messageLabel = new QLabel("<message>");
titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD));
titleLabel.setForeground(Color.BLACK);
messageLabel.setForeground(Color.BLACK);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
index 4b0dc2cc..f592743a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageMetaDataPageLayout.java
@@ -4,7 +4,6 @@ import java.awt.Dimension;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
-import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
@@ -13,6 +12,7 @@ import javax.swing.border.TitledBorder;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.dozmod.gui.control.ComboBox;
import org.openslx.dozmod.gui.control.ComboBox.ComboBoxRenderer;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -44,7 +44,7 @@ public abstract class ImageMetaDataPageLayout extends WizardPage {
GridManager grid = new GridManager(this, 2, false);
- JLabel osCaption = new JLabel("Betriebssystem");
+ QLabel osCaption = new QLabel("Betriebssystem");
osCombo = new ComboBox<>(Comparators.operatingSystem, new ComboBoxRenderer<OperatingSystem>() {
@Override
public String renderItem(OperatingSystem item) {
@@ -57,7 +57,7 @@ public abstract class ImageMetaDataPageLayout extends WizardPage {
grid.add(osCaption);
grid.add(osCombo);
- JLabel descriptionCation = new JLabel("Beschreibung");
+ QLabel descriptionCation = new QLabel("Beschreibung");
descriptionText = new JTextArea(5, 50);
descriptionText.setMinimumSize(new Dimension(0, 70));
descriptionText.setLineWrap(true);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
index 937cae43..0a32d3a8 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
@@ -2,12 +2,11 @@ package org.openslx.dozmod.gui.wizard.layout;
import java.awt.event.KeyEvent;
-import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JCheckBox;
-import javax.swing.JLabel;
import javax.swing.JTextField;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -19,7 +18,7 @@ public abstract class ImageUploadPageLayout extends WizardPage {
protected JButton imageFileBrowseButton;
protected JTextField imageFileTextField;
protected JCheckBox softwareLicenseBox;
- protected JLabel imageNameCaption;
+ protected QLabel imageNameCaption;
/**
* Page for uploading an imagefile
@@ -30,7 +29,7 @@ public abstract class ImageUploadPageLayout extends WizardPage {
GridManager grid = new GridManager(this, 3, false);
// -- Browse for VM --
- JLabel imageFileCaption = new JLabel("Virtuelle Maschine");
+ QLabel imageFileCaption = new QLabel("Virtuelle Maschine");
imageFileTextField = new JTextField();
imageFileTextField.setEditable(false);
imageFileBrowseButton = new JButton("Browse");
@@ -40,7 +39,7 @@ public abstract class ImageUploadPageLayout extends WizardPage {
grid.add(imageFileBrowseButton);
grid.nextRow();
- imageNameCaption = new JLabel("Name des Images");
+ imageNameCaption = new QLabel("Name des Images");
imageNameTextField = new JTextField();
grid.add(imageNameCaption);
grid.add(imageNameTextField, 2, 1).fill(true, false).expand(true, false);
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
index b488e142..056b75d5 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java
@@ -5,7 +5,6 @@ import java.util.Calendar;
import java.util.Date;
import java.util.Properties;
-import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
@@ -16,6 +15,7 @@ import javax.swing.text.DateFormatter;
import org.jdatepicker.impl.JDatePanelImpl;
import org.jdatepicker.impl.JDatePickerImpl;
import org.jdatepicker.impl.UtilDateModel;
+import org.openslx.dozmod.gui.control.QLabel;
import org.openslx.dozmod.gui.helper.GridManager;
import org.openslx.dozmod.gui.wizard.Wizard;
import org.openslx.dozmod.gui.wizard.WizardPage;
@@ -52,7 +52,7 @@ public abstract class LectureCreationPageLayout extends WizardPage {
// lecture name
lectureNameTextField = new JTextField();
- grid.add(new JLabel("Veranstaltungsname"));
+ grid.add(new QLabel("Veranstaltungsname"));
grid.add(lectureNameTextField, 2).fill(true, false).expand(true, false);
grid.nextRow();
@@ -63,7 +63,7 @@ public abstract class LectureCreationPageLayout extends WizardPage {
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
descriptionText.setMinimumSize(new Dimension(0, 60));
descPane.setMinimumSize(descriptionText.getMinimumSize());
- grid.add(new JLabel("Beschreibung"));
+ grid.add(new QLabel("Beschreibung"));
grid.add(descPane, 2).fill(true, false).expand(true, false);
grid.nextRow();
@@ -71,7 +71,7 @@ public abstract class LectureCreationPageLayout extends WizardPage {
startDate = new JDatePickerImpl(new JDatePanelImpl(new UtilDateModel(new Date()), pickerStrings),
new DateLabelFormatter());
startTime = makeTimeSpinner(0, 0);
- grid.add(new JLabel("Startdatum"));
+ grid.add(new QLabel("Startdatum"));
grid.add(startDate).fill(true, false).expand(true, false);
grid.add(startTime);
grid.nextRow();
@@ -79,7 +79,7 @@ public abstract class LectureCreationPageLayout extends WizardPage {
endDate = new JDatePickerImpl(new JDatePanelImpl(new UtilDateModel(new Date()), pickerStrings),
new DateLabelFormatter());
endTime = makeTimeSpinner(23, 59);
- grid.add(new JLabel("Enddatum"));
+ grid.add(new QLabel("Enddatum"));
grid.add(endDate).fill(true, false).expand(true, false);
grid.add(endTime);
grid.nextRow();