diff options
| author | Jonathan Bauer | 2016-01-18 13:59:46 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2016-01-18 13:59:46 +0100 |
| commit | f65f45ed0480ec6659d7ddd668765fef71f75bae (patch) | |
| tree | 70e043aa42e07f3e5a346b254bb7bcc85d47e618 | |
| parent | [client] fix sorting of locations (diff) | |
| download | tutor-module-f65f45ed0480ec6659d7ddd668765fef71f75bae.tar.gz tutor-module-f65f45ed0480ec6659d7ddd668765fef71f75bae.tar.xz tutor-module-f65f45ed0480ec6659d7ddd668765fef71f75bae.zip | |
[client] make the LocationSelectionWindow modal if a parent is given (e.g. LectureDetailsWindow)
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java index ee06692d..60e1e8c4 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LocationSelectionWindowLayout.java @@ -1,6 +1,7 @@ package org.openslx.dozmod.gui.window.layout; import java.awt.Window; +import java.awt.Dialog.ModalityType; import java.util.List; import javax.swing.BorderFactory; @@ -21,12 +22,17 @@ public class LocationSelectionWindowLayout extends JDialog { protected LocationSelector locationSelector; protected JButton btnSaveChanges; protected JButton btnClose; - public LocationSelectionWindowLayout(Window modalParent, List<Integer> locationList) { - super(modalParent); - - getRootPane().setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + + public LocationSelectionWindowLayout(Window modalParent, + List<Integer> locationList) { + super(modalParent, modalParent != null ? ModalityType.APPLICATION_MODAL + : ModalityType.MODELESS); + + getRootPane() + .setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); GridManager grid = new GridManager(this, 1); - WordWrapLabel header = new WordWrapLabel("Hier können Sie die Räume auswählen, in denen diese Veranstaltung sichtbar sein soll."); + WordWrapLabel header = new WordWrapLabel( + "Hier können Sie die Räume auswählen, in denen diese Veranstaltung sichtbar sein soll."); locationSelector = new LocationSelector(); locationSelector.setSelectedLocationsAsIds(locationList); grid.add(header).fill(true, false).expand(true, false); |
