// $Id$
/**
* Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
+ * European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
- *
+ *
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.GeographicalScopeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
* <p>
* CdmSectionPart class.
* </p>
- *
+ *
* @author n.hoffmann
* @created Feb 8, 2010
* @version 1.0
* <p>
* Constructor for CdmSectionPart.
* </p>
- *
+ *
* @param section
* a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
if (input instanceof PolytomousKeyRelationship) {
input = ((PolytomousKeyRelationship) input).getDestination();
}
-
- if ((input instanceof PolytomousKeyNode) &&
- (formSection instanceof PolytomousKeyDetailSection ||
- formSection instanceof GeographicalScopeDetailSection ||
- formSection instanceof ScopeRestrictionSection ||
+
+ if ((input instanceof PolytomousKeyNode) &&
+ (formSection instanceof PolytomousKeyDetailSection ||
+ formSection instanceof GeographicalScopeDetailSection ||
+ formSection instanceof ScopeRestrictionSection ||
formSection instanceof TaxonomicScopeSection)) {
input = ((PolytomousKeyNode)input).getKey();
}
-
-
+
+
formSection.setEntity((T) input);
-
+
return true;
}
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
* .jface.util.PropertyChangeEvent)
public void propertyChange(PropertyChangeEvent event) {
if (event != null) {
- Object eventSource = event.getSource();
-
+ Object eventSource = event.getSource();
+
if (formSection.equals(eventSource)){
markDirty();
}
if((
- (eventSource instanceof AbstractCdmFormElement)
- && formSection.containsFormElement((AbstractCdmFormElement) eventSource))
+ (eventSource instanceof ICdmFormElement)
+ && formSection.containsFormElement((ICdmFormElement) eventSource))
) {
markDirty();
}