3 * Copyright (C) 2013 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.io
.wizard
.specimenSearch
;
12 import java
.util
.List
;
14 import org
.eclipse
.jface
.dialogs
.IPageChangedListener
;
15 import org
.eclipse
.jface
.dialogs
.PageChangedEvent
;
16 import org
.eclipse
.jface
.wizard
.WizardPage
;
17 import org
.eclipse
.swt
.widgets
.Composite
;
19 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
20 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.specimenSearch
.SpecimenSearchResultsController
;
27 public class SpecimenSearchResultWizardPage
extends WizardPage
implements IPageChangedListener
{
29 private SpecimenSearchResultsController specimenSearchResultsController
;
30 private List
<SpecimenOrObservationBase
> results
;
35 protected SpecimenSearchResultWizardPage(String pageName
, List
<SpecimenOrObservationBase
> results
) {
37 this.results
= results
;
41 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
44 public void createControl(Composite parent
) {
45 specimenSearchResultsController
= new SpecimenSearchResultsController(parent
);
46 setControl(specimenSearchResultsController
.getComposite());
50 public void setVisible(boolean visible
) {
51 super.setVisible(visible
);
55 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
58 public void pageChanged(PageChangedEvent event
) {
60 if(results
!=null && !results
.isEmpty()){
61 specimenSearchResultsController
.setText(results
.get(0).getTitleCache());