ce631623abe0a09127843bbd610c6258645b23e1
[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 private DerivateSearchCompositeController derivateSearchCompositeController;
24
25 public DerivateSearchView() {
26 }
27
28 /* (non-Javadoc)
29 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
30 */
31 @Override
32 public void createPartControl(Composite parent) {
33 derivateSearchCompositeController = new DerivateSearchCompositeController(parent);
34 getSite().setSelectionProvider(derivateSearchCompositeController.getDerivateSearchComposite().getResultViewer());
35 }
36
37 /* (non-Javadoc)
38 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
39 */
40 @Override
41 public void setFocus() {
42 derivateSearchCompositeController.getDerivateSearchComposite().setFocus();
43 }
44 }