diff options
author | Stephan Schwaer | 2015-07-07 18:41:13 +0200 |
---|---|---|
committer | Stephan Schwaer | 2015-07-07 18:41:13 +0200 |
commit | 6cdab2d80d7f614345a93f429a8c337fcd161f96 (patch) | |
tree | cbe9f7929df0363ab744399ee99bcc52fa06bd0a /dozentenmodul/src/main/java/wizards/ImageMetaDataPage.java | |
parent | [client] Adapt to changes in master-sync-shared/ThriftManager (diff) | |
download | tutor-module-6cdab2d80d7f614345a93f429a8c337fcd161f96.tar.gz tutor-module-6cdab2d80d7f614345a93f429a8c337fcd161f96.tar.xz tutor-module-6cdab2d80d7f614345a93f429a8c337fcd161f96.zip |
[client] Added imageWindowComposite and early stage of wizard for creating/editing images.
Diffstat (limited to 'dozentenmodul/src/main/java/wizards/ImageMetaDataPage.java')
-rw-r--r-- | dozentenmodul/src/main/java/wizards/ImageMetaDataPage.java | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/wizards/ImageMetaDataPage.java b/dozentenmodul/src/main/java/wizards/ImageMetaDataPage.java new file mode 100644 index 00000000..4f267dda --- /dev/null +++ b/dozentenmodul/src/main/java/wizards/ImageMetaDataPage.java @@ -0,0 +1,109 @@ +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.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; + + + +public class ImageMetaDataPage extends WizardPage { + + protected Composite container; + + protected Combo osCombo; + protected Text descriptionText; + protected Button licencedSoftwareCheck; + protected Button licenceServerButton; + + // permissions checks + protected Button readPermissionsCheck; + protected Button writePermissionsCheck; + protected Button linkPermissionsCheck; + protected Button adminPermissionsCheck; + + + + /** + * wizard page for entering image data at creating or editing an image + */ + public ImageMetaDataPage() { + super("Eingabe Ihrer Daten"); + setTitle("Eingabe Ihrer Daten"); + setDescription("Geben Sie bitte einen aussagekräftigen Namen für das neue Image ein."); + } + + + + @Override + public void createControl(Composite parent) { + container = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(); + container.setLayout(layout); + layout.numColumns = 2; + + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + + + + Label osCaption = new Label(container, SWT.NONE); + osCaption.setText("Betriebssystem:"); + osCombo = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY); + + Label descriptionCation = new Label(container, SWT.NONE); + descriptionCation.setText("Beschreibung:"); + descriptionText = new Text(container, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); + gd = new GridData(GridData.FILL_HORIZONTAL); + gd.heightHint = 80; + descriptionText.setLayoutData(gd); + + Label licencedSoftwareCaption = new Label(container, SWT.NONE); + licencedSoftwareCaption.setText("Image enthält lizensierte Software:"); + licencedSoftwareCheck = new Button(container, SWT.CHECK); + + + Label licenceServerCaption = new Label(container, SWT.NONE); + licenceServerCaption.setText("Lizenzserver:"); + licenceServerButton = new Button(container, SWT.PUSH); + licenceServerButton.setText("Server-Adresse"); + + + Group permissionsGroup = new Group(container, SWT.BORDER); + gd = new GridData(); + gd.horizontalSpan = 2; + permissionsGroup.setLayoutData(gd); + + + permissionsGroup.setText("Standart Berechtigungen"); + permissionsGroup.setLayout(new GridLayout(4, true)); + + readPermissionsCheck = new Button(permissionsGroup, SWT.CHECK); + readPermissionsCheck.setText("Lesen"); + writePermissionsCheck = new Button(permissionsGroup, SWT.CHECK); + writePermissionsCheck.setText("Schreiben"); + linkPermissionsCheck = new Button(permissionsGroup, SWT.CHECK); + linkPermissionsCheck.setText("Verlinken"); + adminPermissionsCheck = new Button(permissionsGroup, SWT.CHECK); + adminPermissionsCheck.setText("Admin"); + + + // required to avoid an error in the system + setControl(container); + setPageComplete(true); + } + + + public String getImageDescription() { + return descriptionText.getText(); + } + +} |