- added "Derivates" perspective
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / campanula / derivatesearch / DerivateSearchView.java
1 // $Id$
2 /**
3 * Copyright (C) 2013 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.taxeditor.ui.campanula.derivatesearch;
11
12 import org.eclipse.swt.widgets.Composite;
13 import org.eclipse.ui.part.ViewPart;
14
15 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
16
17 /**
18 * This view allows to search for and filter {@link SpecimenOrObservationBase}s and display
19 * the results in a list. The results can be selected and opened in an editor.
20 */
21 public class DerivateSearchView extends ViewPart {
22
23 public static final String ID = "eu.etaxonomy.taxeditor.ui.campanula.derivatesearch.DerivateSearchView";
24 private DerivateSearchCompositeController derivateSearchCompositeController;
25
26 public DerivateSearchView() {
27 }
28
29 /* (non-Javadoc)
30 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
31 */
32 @Override
33 public void createPartControl(Composite parent) {
34 derivateSearchCompositeController = new DerivateSearchCompositeController(parent);
35 getSite().setSelectionProvider(derivateSearchCompositeController.getDerivateSearchComposite().getResultViewer());
36 }
37
38 /* (non-Javadoc)
39 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
40 */
41 @Override
42 public void setFocus() {
43 derivateSearchCompositeController.getDerivateSearchComposite().getResultViewer().getControl().setFocus();
44 }
45 }