summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java
index 8c902407..45558121 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java
@@ -64,9 +64,16 @@ public final class SWTUtils {
public static class AnchorSetter {
private final Control c;
private final FormData fd = new FormData();
+ private boolean didSet = false;
private AnchorSetter(Control c) { this.c = c; }
+
+ @Override
+ protected void finalize() {
+ if (!didSet)
+ log.warn("AnchorSetter: you did not call set()!");
+ }
- public void set() { this.c.setLayoutData(this.fd); }
+ public void set() { this.c.setLayoutData(this.fd); didSet = true; }
public AnchorSetter height(int h) { fd.height = h; return this; }
public AnchorSetter width(int w) { fd.width = w; return this; }