summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-14 17:36:06 +0200
committerSimon Rettberg2015-08-14 17:36:06 +0200
commit4908138a474579b263222be3644184f6c135fdbe (patch)
tree919ece302f4de9b9a676cd3b682cc6f2cd199f7f /dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper
parent[client] Support Ctrl-W shortcut (diff)
downloadtutor-module-4908138a474579b263222be3644184f6c135fdbe.tar.gz
tutor-module-4908138a474579b263222be3644184f6c135fdbe.tar.xz
tutor-module-4908138a474579b263222be3644184f6c135fdbe.zip
[client] Use GridManager in lecture details window
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/GridManager.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/GridManager.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/GridManager.java
index 766ab94c..0bf36c3a 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/GridManager.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/GridManager.java
@@ -157,6 +157,32 @@ public class GridManager {
}
/**
+ * Convenience method for adding an empty placeholder in the current cell.
+ */
+ public GBC skip() {
+ return add(Box.createGlue());
+ }
+
+ /**
+ * Convenience method for adding an empty placeholder in the current cell.
+ *
+ * @param spanX horizontal span
+ */
+ public GBC skip(int spanX) {
+ return add(Box.createGlue(), spanX);
+ }
+
+ /**
+ * Convenience method for adding an empty placeholder in the current cell.
+ *
+ * @param spanX horizontal span
+ * @param spanY vertical span
+ */
+ public GBC skip(int spanX, int spanY) {
+ return add(Box.createGlue(), spanX, spanY);
+ }
+
+ /**
* Advance to next row.
*
* @throws IllegalStateException if strict mode is enabled and the current
@@ -334,6 +360,18 @@ public class GridManager {
return this;
}
+ /**
+ * Set the anchor field of this {@link GridBagConstraints} instance.
+ *
+ * @param value
+ * @return
+ */
+ public GBC anchor(int value) {
+ checkValid();
+ this.anchor = value;
+ return this;
+ }
+
// Extend with more helpers as needed
private GBC(Component component, int spanX, int spanY) {