diff options
Diffstat (limited to 'dozentenmodul/src/main/java')
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadPageLayout.java | 5 | ||||
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java | 6 |
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) { |
