2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.featuretree
;
12 import java
.util
.ArrayList
;
13 import java
.util
.List
;
15 import org
.eclipse
.jface
.wizard
.WizardPage
;
16 import org
.eclipse
.swt
.SWT
;
17 import org
.eclipse
.swt
.widgets
.Composite
;
19 import eu
.etaxonomy
.cdm
.persistence
.dto
.AbstractTermDto
;
20 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermDto
;
21 import eu
.etaxonomy
.taxeditor
.view
.search
.facet
.SearchComposite
;
22 import eu
.etaxonomy
.taxeditor
.view
.search
.facet
.term
.TermSearchController
;
28 public class TermChooseWizardPage
extends WizardPage
{
30 private TermSearchController controller
;
33 protected TermChooseWizardPage(TermDto term
) {
34 super("Term Choose Wizard");
35 setTitle("Choose Parent");
36 setDescription("Please search and select the parent term or vocabulary (if you want to move the term as root).");
41 public void createControl(Composite parent
) {
42 SearchComposite searchComposite
= new SearchComposite(parent
, SWT
.NONE
);
43 controller
= new TermSearchController(searchComposite
, term
, this);
44 setControl(searchComposite
);
47 public List
<AbstractTermDto
> getSelectedTerms() {
48 List
<AbstractTermDto
> termDtos
= new ArrayList
<>();
49 controller
.getSelectedSearchResults().forEach(result
->termDtos
.add(result
.getContent()));