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
.view
.propertysheetsupport
;
14 import org
.apache
.log4j
.Logger
;
15 import org
.eclipse
.jface
.viewers
.CellEditor
;
16 import org
.eclipse
.jface
.viewers
.DialogCellEditor
;
17 import org
.eclipse
.swt
.widgets
.Composite
;
18 import org
.eclipse
.swt
.widgets
.Control
;
19 import org
.eclipse
.swt
.widgets
.Dialog
;
20 import org
.eclipse
.ui
.views
.properties
.PropertyDescriptor
;
22 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
23 import eu
.etaxonomy
.taxeditor
.actions
.ui
.OpenNameRelationsListWizardAction
;
26 * Property sheet descriptor that pops up a dialog window
33 abstract public class NameRelationsPropertyDescriptor
extends PropertyDescriptor
{
34 private static final Logger logger
= Logger
35 .getLogger(NameRelationsPropertyDescriptor
.class);
37 private TaxonNameBase name
;
39 public NameRelationsPropertyDescriptor(Object id
, String displayName
, TaxonNameBase name
) {
40 super(id
, displayName
);
44 public CellEditor
createPropertyEditor(Composite parent
) {
45 CellEditor editor
= new DialogCellEditor(parent
) {
47 protected Dialog dialog
;
50 protected Object
openDialogBox(
51 Control cellEditorWindow
) {
53 new OpenNameRelationsListWizardAction(name
).run();
58 if (getValidator() != null) {
59 editor
.setValidator(getValidator());
64 abstract protected void saveNameRelations(Set set
);