summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-07-23 17:23:33 +0200
committerStephan Schwaer2015-07-23 17:23:33 +0200
commitb2e23908409dd81334ed139912dbb586ac6147db (patch)
tree6f7df757e4e89323c4f71b7807a8bbd06fafae71 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java
parent[client] getTable for ImageCustomPermissionPage (soon not needed anymore!!!!!... (diff)
downloadtutor-module-b2e23908409dd81334ed139912dbb586ac6147db.tar.gz
tutor-module-b2e23908409dd81334ed139912dbb586ac6147db.tar.xz
tutor-module-b2e23908409dd81334ed139912dbb586ac6147db.zip
[client] Changed date selection in lecture create page, set text fields editable in image details if user has edit rights, dispose fonts.
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.java18
1 files changed, 16 insertions, 2 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 0227d701..dab012d3 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,6 +1,8 @@
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;
@@ -32,14 +34,16 @@ public abstract class VirtualizerNoticeWindowLayout extends Composite {
// layout for this composite
this.setLayout(new GridLayout(1, false));
+ GridData gd = new GridData();
+ gd.widthHint = 500;
+ this.setLayoutData(gd);
// bold title at start.
Label titleLabel = new Label(this, SWT.NONE);
titleLabel.setText(infoTitle);
FontData fontData = titleLabel.getFont().getFontData()[0];
- Font font = new Font(Gui.display, new FontData(fontData.getName(), fontData.getHeight(), SWT.BOLD));
+ final Font font = new Font(Gui.display, 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);
@@ -72,5 +76,15 @@ public abstract class VirtualizerNoticeWindowLayout extends Composite {
continueButton.setText("Weiter");
continueButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.END, false, false));
+ // Dispose of stuff we allocated
+ this.addDisposeListener(new DisposeListener() {
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ font.dispose();
+ }
+ });
+
}
+
+
} \ No newline at end of file