summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/Wizard.java2
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java17
2 files changed, 17 insertions, 2 deletions
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 72a7618c..20cb1436 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
@@ -261,7 +261,7 @@ public abstract class Wizard extends JDialog {
return isCancelled;
}
- protected final void doNext() {
+ public final void doNext() {
if (isPostFinish || !btnNext.isEnabled())
return;
if (currentPage + 1 < pages.size()) {
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java
index 569a6192..6524705c 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureImageListPage.java
@@ -1,5 +1,9 @@
package org.openslx.dozmod.gui.wizard.page;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
@@ -31,7 +35,7 @@ public class LectureImageListPage extends LectureImageListPageLayout {
/**
* Page for setting custom permissions of a lecture
*/
- public LectureImageListPage(Wizard wizard, LectureWizardState state) {
+ public LectureImageListPage(final Wizard wizard, LectureWizardState state) {
super(wizard);
this.state = state;
setPageComplete(false);
@@ -51,12 +55,21 @@ public class LectureImageListPage extends LectureImageListPageLayout {
ImageCache.get(true);
}
});
+ imageTable.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2) {
+ wizard.doNext();
+ }
+ }
+ });
}
@Override
protected void onPageEnter() {
imageListViewer.refreshList(false, 1);
}
+
/**
* Called by event listeners. This will set guidance message or error
* message and call setPageComplete(bool) accordingly. The state will be
@@ -67,10 +80,12 @@ public class LectureImageListPage extends LectureImageListPageLayout {
setPageComplete(b);
return b;
}
+
@Override
protected boolean wantNextOrFinish() {
return reactToUserInput();
}
+
private boolean isPageValid() {
ImageSummaryRead selected = imageTable.getSelectedItem();
if (selected != null && selected.isValid && ImagePerms.canLink(selected)) {