summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-07-13 12:10:36 +0200
committerSimon Rettberg2015-07-13 12:10:36 +0200
commitf6c4b64220f04ce09ead0a987b72449a6e8a9b29 (patch)
treea80fe1061ad8632e2b42c1f63bfcdc1b3d86004c
parent[client] Common parent class for pages shown in the main window. Do not dispo... (diff)
downloadtutor-module-f6c4b64220f04ce09ead0a987b72449a6e8a9b29.tar.gz
tutor-module-f6c4b64220f04ce09ead0a987b72449a6e8a9b29.tar.xz
tutor-module-f6c4b64220f04ce09ead0a987b72449a6e8a9b29.zip
[client] ImageUploadPage*: Move logic from layout class to implementation
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java5
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java6
2 files changed, 6 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
index 851e4b11..a1612fc6 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java
@@ -16,18 +16,16 @@ public abstract class ImageUploadPageLayout extends WizardPage {
protected Text imageName;
protected Composite container;
- protected boolean editExistingImage;
protected Button imageFileBrowseButton;
/**
* Page for uploading an imagefile
* @param editExistingImage wether to edit existing image file or create new one
*/
- public ImageUploadPageLayout(boolean editExistingImage) {
+ public ImageUploadPageLayout() {
super("Eingabe Ihrer Daten");
setTitle("Eingabe Ihrer Daten");
setDescription("Geben Sie bitte einen aussagekräftigen Namen für das neue Image ein.");
- this.editExistingImage = editExistingImage;
}
@Override
@@ -41,7 +39,6 @@ public abstract class ImageUploadPageLayout extends WizardPage {
imageName = new Text(container, SWT.BORDER | SWT.SINGLE);
imageName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- imageName.setEnabled(!editExistingImage);
Label imageFileCaption = new Label(container, SWT.NONE);
imageFileCaption.setText("Imagefile:");
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
index bd0f1f80..7b5836f9 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
@@ -7,14 +7,18 @@ import org.openslx.dozmod.gui.wizard.layout.ImageUploadPageLayout;
public class ImageUploadPage extends ImageUploadPageLayout {
+ protected final boolean editExistingImage;
+
public ImageUploadPage(boolean editExistingImage) {
- super(editExistingImage);
+ super();
setPageComplete(false);
+ this.editExistingImage = editExistingImage;
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
+ imageName.setEnabled(!editExistingImage);
imageName.addKeyListener(new KeyListener() {
@Override
public void keyPressed(KeyEvent e) {