summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/wizards/ImageUploadPage.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-07-08 19:39:35 +0200
committerSimon Rettberg2015-07-08 19:39:35 +0200
commit8d6cd17c330388aa13fd7c39802c7400d85f972c (patch)
tree5f2c5856f58b1454e24dc16fad10751dfe9d087b /dozentenmodul/src/main/java/wizards/ImageUploadPage.java
parentoops (diff)
downloadtutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.tar.gz
tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.tar.xz
tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.zip
[client] Redo package structure, add comments/TODOs, rename GUI classes
Diffstat (limited to 'dozentenmodul/src/main/java/wizards/ImageUploadPage.java')
-rw-r--r--dozentenmodul/src/main/java/wizards/ImageUploadPage.java87
1 files changed, 0 insertions, 87 deletions
diff --git a/dozentenmodul/src/main/java/wizards/ImageUploadPage.java b/dozentenmodul/src/main/java/wizards/ImageUploadPage.java
deleted file mode 100644
index b4f36589..00000000
--- a/dozentenmodul/src/main/java/wizards/ImageUploadPage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package wizards;
-
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-
-public class ImageUploadPage 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 ImageUploadPage(boolean editExistingImage) {
- 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
- public void createControl(Composite parent) {
- container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 2;
- Label imageNameCaption= new Label(container, SWT.NONE);
- imageNameCaption.setText("Name des Images");
-
-
- imageName = new Text(container, SWT.BORDER | SWT.SINGLE);
- imageName.setText("");
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- imageName.setLayoutData(gd);
- imageName.setEnabled(!editExistingImage);
- System.out.println(editExistingImage);
-
- imageName.addKeyListener(new KeyListener() {
- @Override
- public void keyPressed(KeyEvent e) {
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- if (!imageName.getText().isEmpty()) {
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
- }
- });
-
- Label imageFileCaption = new Label(container, SWT.NONE);
- imageFileCaption.setText("Imagefile:");
- imageFileBrowseButton = new Button(container, SWT.PUSH);
- imageFileBrowseButton.setText("Browse");
-
-
- // required to avoid an error in the system
- setControl(container);
- setPageComplete(editExistingImage);
- }
-
-
- public String getText1() {
- return imageName.getText();
- }
-
-}