3 * Copyright (C) 2016 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
.ui
.section
.vocabulary
;
12 import org
.eclipse
.jface
.wizard
.Wizard
;
14 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
15 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
16 import eu
.etaxonomy
.taxeditor
.ui
.translation
.TermTranslationWizardPage
;
23 public class TermTranslationWizard
extends Wizard
{
24 private TermTranslationWizardPage page
;
26 private final TermBase term
;
29 * <p>Constructor for TranslationWizard.</p>
31 * @param multilanguageText a {@link java.util.Map} object.
33 public TermTranslationWizard(TermBase term
) {
34 setWindowTitle("Translation Editor");
36 setNeedsProgressMonitor(true);
40 * @see org.eclipse.jface.wizard.Wizard#addPages()
44 public void addPages() {
45 page
= new TermTranslationWizardPage(term
);
50 * @see org.eclipse.jface.wizard.Wizard#performFinish()
54 public boolean performFinish() {
55 Representation representation
= page
.getTargetRepresentation();
57 if (!representation
.getText().equals("") || !representation
.getLabel().equals("") || !representation
.getAbbreviatedLabel().equals("")) {
58 term
.addRepresentation(representation
);