- added specimen search wizard (no functionality yet)
authorPatric Plitzner <p.plitzner@bgbm.org>
Thu, 12 Sep 2013 12:49:07 +0000 (12:49 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Thu, 12 Sep 2013 12:49:07 +0000 (12:49 +0000)
.gitattributes
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchResultWizardPage.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizard.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizardPage.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchComposite.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchController.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsComposite.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsController.java [new file with mode: 0644]

index eb02b49b3c3a050b020c11a600a2717fee02328c..fd1d81fb821b92313f659815410e90cb6e966c6b 100644 (file)
@@ -1111,6 +1111,9 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddI
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SpecimenCdmExcelImportWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/TcsExportWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/TcsImportWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchResultWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/labels/DefaultLabelStrategy.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/labels/ILabelImageStrategy.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/labels/LabelImageProvider.java -text
@@ -1252,6 +1255,10 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/d
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/detailViews/specimen/SpecimenDetailsElementController.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/detailViews/specimen/SpecimenDetailsSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/detailViews/specimen/SpecimenGeneralSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchComposite.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchController.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsComposite.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsController.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java -text
index d9905c2e2a8d7e4863ec9323dc29abc31a839b59..58a2e84006f9814da95a040e6dedbf97ea8a0d55 100644 (file)
@@ -16,6 +16,7 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.handler,
  eu.etaxonomy.taxeditor.io,
  eu.etaxonomy.taxeditor.io.wizard,
+ eu.etaxonomy.taxeditor.io.wizard.specimenSearch,
  eu.etaxonomy.taxeditor.labels,
  eu.etaxonomy.taxeditor.model;uses:="eu.etaxonomy.cdm.model.common,eu.etaxonomy.cdm.model.name,eu.etaxonomy.cdm.model.taxon",
  eu.etaxonomy.taxeditor.newWizard,
index 0f385a5af4379ea0d8e7284f951117b331af9ada..eaf2742d2590371b6bae8c228a9dc7a135c02be3 100644 (file)
             id="eu.etaxonomy.taxeditor.io.import.specimenCdmExcel"
             name="Specimen CDM Excel">
       </wizard>
+      <wizard
+            category="eu.etaxonomy.taxeditor.import.category.cdm"
+            class="eu.etaxonomy.taxeditor.io.wizard.specimenSearch.SpecimenSearchWizard"
+            id="eu.etaxonomy.taxeditor.io.wizard.specimenSearch.SpecimenSearchWizard"
+            name="Specimen Search">
+      </wizard>
    </extension>
    <extension
          point="org.eclipse.ui.exportWizards">
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchResultWizardPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchResultWizardPage.java
new file mode 100644 (file)
index 0000000..2832fcc
--- /dev/null
@@ -0,0 +1,39 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.io.wizard.specimenSearch;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.widgets.Composite;
+
+import eu.etaxonomy.taxeditor.ui.campanula.specimenSearch.SpecimenSearchResultsController;
+
+/**
+ * @author pplitzner
+ * @date 12.09.2013
+ *
+ */
+public class SpecimenSearchResultWizardPage extends WizardPage {
+
+    /**
+     * @param pageName
+     */
+    protected SpecimenSearchResultWizardPage(String pageName) {
+        super(pageName);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    @Override
+    public void createControl(Composite parent) {
+        setControl(new SpecimenSearchResultsController(parent).getComposite());
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizard.java
new file mode 100644 (file)
index 0000000..775d532
--- /dev/null
@@ -0,0 +1,48 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.io.wizard.specimenSearch;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * @author pplitzner
+ * @date 11.09.2013
+ *
+ */
+public class SpecimenSearchWizard extends Wizard implements IImportWizard {
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    @Override
+    public boolean performFinish() {
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    @Override
+    public void addPages() {
+        addPage(new SpecimenSearchWizardPage("Specimen Search"));
+        addPage(new SpecimenSearchResultWizardPage("Search Results"));
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+     */
+    @Override
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizardPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/specimenSearch/SpecimenSearchWizardPage.java
new file mode 100644 (file)
index 0000000..4fb724c
--- /dev/null
@@ -0,0 +1,39 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.io.wizard.specimenSearch;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.widgets.Composite;
+
+import eu.etaxonomy.taxeditor.ui.campanula.specimenSearch.SpecimenSearchController;
+
+/**
+ * @author pplitzner
+ * @date 12.09.2013
+ *
+ */
+public class SpecimenSearchWizardPage extends WizardPage{
+
+    /**
+     * @param pageName
+     */
+    protected SpecimenSearchWizardPage(String pageName) {
+        super(pageName);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    @Override
+    public void createControl(Composite parent) {
+        setControl(new SpecimenSearchController(parent).getComposite());
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchComposite.java
new file mode 100644 (file)
index 0000000..2eef4f1
--- /dev/null
@@ -0,0 +1,140 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.campanula.specimenSearch;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+/**
+ * @author pplitzner
+ * @date 03.09.2013
+ *
+ */
+public class SpecimenSearchComposite extends Composite {
+    private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
+    private Text textTaxonName;
+    private Text textCollector;
+    private Text textCollectorNumber;
+    private Text textAccessionNumber;
+    private Text textLocality;
+    private Combo comboHerbarium;
+    private Combo comboCountry;
+
+    /**
+     * Create the composite.
+     * @param parent
+     * @param style
+     */
+    public SpecimenSearchComposite(Composite parent, int style) {
+        super(parent, style);
+        setBackgroundMode(SWT.INHERIT_DEFAULT);
+        {
+            TableWrapLayout tableWrapLayout = new TableWrapLayout();
+            tableWrapLayout.numColumns = 2;
+            setLayout(tableWrapLayout);
+        }
+
+        Label lblTaxonName = formToolkit.createLabel(this, "Taxon Name", SWT.NONE);
+
+        textTaxonName = new Text(this, SWT.BORDER);
+        textTaxonName.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(textTaxonName, true, true);
+
+        Label lblCollectors = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblCollectors, true, true);
+        lblCollectors.setText("Collector(s)");
+
+        textCollector = new Text(this, SWT.BORDER);
+        textCollector.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(textCollector, true, true);
+
+        Label lblCollectorsNumber = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblCollectorsNumber, true, true);
+        lblCollectorsNumber.setText("Collector(s) Number");
+
+        textCollectorNumber = new Text(this, SWT.BORDER);
+        textCollectorNumber.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(textCollectorNumber, true, true);
+
+        Label lblAccessionNumber = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblAccessionNumber, true, true);
+        lblAccessionNumber.setText("Accession Number");
+
+        textAccessionNumber = new Text(this, SWT.BORDER);
+        textAccessionNumber.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(textAccessionNumber, true, true);
+
+        Label lblHerbarium = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblHerbarium, true, true);
+        lblHerbarium.setText("Herbarium");
+
+        comboHerbarium = new Combo(this, SWT.NONE);
+        comboHerbarium.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(comboHerbarium);
+        formToolkit.paintBordersFor(comboHerbarium);
+
+        Label lblCountry = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblCountry, true, true);
+        lblCountry.setText("Country");
+
+        comboCountry = new Combo(this, SWT.NONE);
+        comboCountry.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(comboCountry);
+        formToolkit.paintBordersFor(comboCountry);
+
+        Label lblLocality = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblLocality, true, true);
+        lblLocality.setText("Locality");
+
+        textLocality = new Text(this, SWT.BORDER);
+        textLocality.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+        formToolkit.adapt(textLocality, true, true);
+
+        Label lblCollectionDate = new Label(this, SWT.NONE);
+        formToolkit.adapt(lblCollectionDate, true, true);
+        lblCollectionDate.setText("Collection Date");
+        new Label(this, SWT.NONE);
+
+    }
+
+    @Override
+    protected void checkSubclass() {
+        // Disable the check that prevents subclassing of SWT components
+    }
+
+    public Text getTextTaxonName() {
+        return textTaxonName;
+    }
+    public Text getTextCollector() {
+        return textCollector;
+    }
+    public Text getTextCollectorNumber() {
+        return textCollectorNumber;
+    }
+    public Text getTextAccessionNumber() {
+        return textAccessionNumber;
+    }
+    public Combo getComboHerbarium() {
+        return comboHerbarium;
+    }
+    public Combo getComboCountry() {
+        return comboCountry;
+    }
+    public Text getTextLocality() {
+        return textLocality;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchController.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchController.java
new file mode 100644 (file)
index 0000000..1d948f2
--- /dev/null
@@ -0,0 +1,34 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.campanula.specimenSearch;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author pplitzner
+ * @date 03.09.2013
+ *
+ */
+public class SpecimenSearchController {
+
+    private SpecimenSearchComposite specimenSearchComposite;
+
+    /**
+     * @param specimenSearchComposite
+     */
+    public SpecimenSearchController(Composite parent) {
+        this.specimenSearchComposite = new SpecimenSearchComposite(parent, SWT.NONE);
+    }
+
+    public Composite getComposite() {
+        return specimenSearchComposite;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsComposite.java
new file mode 100644 (file)
index 0000000..c1f6179
--- /dev/null
@@ -0,0 +1,53 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.campanula.specimenSearch;
+
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author pplitzner
+ * @date 12.09.2013
+ *
+ */
+public class SpecimenSearchResultsComposite extends Composite {
+    private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
+    private Text txtNewText;
+
+    /**
+     * Create the composite.
+     * @param parent
+     * @param style
+     */
+    public SpecimenSearchResultsComposite(Composite parent, int style) {
+        super(parent, style);
+        {
+            TableWrapLayout tableWrapLayout = new TableWrapLayout();
+            setLayout(tableWrapLayout);
+        }
+        
+        txtNewText = formToolkit.createText(this, "New Text", SWT.NONE);
+        txtNewText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
+
+    }
+
+    @Override
+    protected void checkSubclass() {
+        // Disable the check that prevents subclassing of SWT components
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsController.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchResultsController.java
new file mode 100644 (file)
index 0000000..49fbaf3
--- /dev/null
@@ -0,0 +1,31 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.campanula.specimenSearch;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author pplitzner
+ * @date 12.09.2013
+ *
+ */
+public class SpecimenSearchResultsController {
+
+    private SpecimenSearchResultsComposite specimenSearchResultsComposite;
+
+    public SpecimenSearchResultsController(Composite parent) {
+        this.specimenSearchResultsComposite = new SpecimenSearchResultsComposite(parent, SWT.NONE);
+    }
+
+    public Composite getComposite(){
+        return specimenSearchResultsComposite;
+    }
+}