From 48631e6b627bb2d2b3efa26a8f08014b0a55df03 Mon Sep 17 00:00:00 2001 From: Patric Plitzner Date: Mon, 28 Oct 2013 08:27:43 +0000 Subject: [PATCH] - added supportsXYZ flags for Features (#3207) --- .gitattributes | 1 + .../taxeditor/ui/element/CdmFormFactory.java | 228 +++++++++--------- .../vocabulary/FeatureDetailElement.java | 85 +++++++ 3 files changed, 202 insertions(+), 112 deletions(-) create mode 100644 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java diff --git a/.gitattributes b/.gitattributes index d7e6941d9..63eab2f12 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1482,6 +1482,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/use eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java -text eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java -text eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailSection.java -text +eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java -text eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java -text eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java -text eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java -text diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java index 57681c96a..3b471942a 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java @@ -1,5 +1,5 @@ /** - * + * */ package eu.etaxonomy.taxeditor.ui.element; @@ -247,6 +247,7 @@ import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailElement; import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection; import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement; import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection; +import eu.etaxonomy.taxeditor.ui.section.vocabulary.FeatureDetailElement; import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection; import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement; import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection; @@ -258,7 +259,7 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement; *

* CdmFormFactory class. *

- * + * * @author n.hoffmann * @created Feb 24, 2010 * @version 1.0 @@ -283,9 +284,9 @@ public class CdmFormFactory extends FormToolkit { return true; } }; - + /** - * + * * @author n.hoffmann * @date Jan 25, 2010 * @@ -298,7 +299,7 @@ public class CdmFormFactory extends FormToolkit { } /** - * + * * @author n.hoffmann * @date Jan 25, 2010 * @@ -324,7 +325,7 @@ public class CdmFormFactory extends FormToolkit { *

* Constructor for CdmFormFactory. *

- * + * * @param display * a {@link org.eclipse.swt.widgets.Display} object. * @param selectionProvider @@ -340,7 +341,7 @@ public class CdmFormFactory extends FormToolkit { *

* Constructor for CdmFormFactory. *

- * + * * @param display * a {@link org.eclipse.swt.widgets.Display} object. */ @@ -350,7 +351,7 @@ public class CdmFormFactory extends FormToolkit { } /** - * + * */ private void init() { boldFontHolder2 = new BoldFontHolder2(); @@ -360,10 +361,10 @@ public class CdmFormFactory extends FormToolkit { /** * Creates an instance initialized with the correct selectionProvider - * + * * Make sure to remove the instance when the entityComposite disposes via * destroySelectionArbitrator(..) - * + * * @param entityElement * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} * object. @@ -382,7 +383,7 @@ public class CdmFormFactory extends FormToolkit { *

* destroySelectionArbitrator *

- * + * * @param selectionArbitrator * a * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} @@ -410,7 +411,7 @@ public class CdmFormFactory extends FormToolkit { * Adapts the {@link AbstractCdmFormElement}:
* - sets the {@link IPropertyChangeListener}s handled by this class *

- * + * * @param formElement * a * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement} @@ -433,7 +434,7 @@ public class CdmFormFactory extends FormToolkit { *

* destroyElement *

- * + * * @param formElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -474,7 +475,7 @@ public class CdmFormFactory extends FormToolkit { *

* createEmptyCell *

- * + * * @param parent * a {@link org.eclipse.swt.widgets.Composite} object. * @return a {@link org.eclipse.swt.widgets.Label} object. @@ -487,7 +488,7 @@ public class CdmFormFactory extends FormToolkit { *

* createMultilineTextWithLabel *

- * + * * @param labelString * a {@link java.lang.String} object. * @param textHeight @@ -512,7 +513,7 @@ public class CdmFormFactory extends FormToolkit { *

* createMultiLanguageTextElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -550,7 +551,7 @@ public class CdmFormFactory extends FormToolkit { *

* createTextWithLabelElement *

- * + * * @param labelString * a {@link java.lang.String} object. * @param initialText @@ -597,7 +598,7 @@ public class CdmFormFactory extends FormToolkit { } /** - * + * * @param parentElement * @param labelString * @param conversationEnabled @@ -617,7 +618,7 @@ public class CdmFormFactory extends FormToolkit { *

* createIntegerTextWithLabelElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -646,7 +647,7 @@ public class CdmFormFactory extends FormToolkit { *

* createLanguageStringWithLabelElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -673,7 +674,7 @@ public class CdmFormFactory extends FormToolkit { *

* createLanguageStringWithLabelElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -702,7 +703,7 @@ public class CdmFormFactory extends FormToolkit { *

* createTextElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -724,7 +725,7 @@ public class CdmFormFactory extends FormToolkit { *

* createKeyValueViewerElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -749,7 +750,7 @@ public class CdmFormFactory extends FormToolkit { *

* createTermComboElement *

- * + * * @param termComboType * a * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType} @@ -767,7 +768,7 @@ public class CdmFormFactory extends FormToolkit { * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement} * object. */ - + public TermComboElement createTermComboElement(Class termComboType, ICdmFormElement parentElement, String labelString, T selection, int style) { TermComboElement element = new TermComboElement(this, parentElement, termComboType, labelString, @@ -776,12 +777,12 @@ public class CdmFormFactory extends FormToolkit { parentElement.addElement(element); return element; } - + /** *

* createTermComboElement *

- * + * * @param termComboType * a * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType} @@ -799,12 +800,12 @@ public class CdmFormFactory extends FormToolkit { * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement} * object. */ - + public TermComboElement createDefinedTermComboElement( - TermType termType, + TermType termType, ICdmFormElement parentElement, - String labelString, - T selection, + String labelString, + T selection, int style) { TermComboElement element = new TermComboElement(this, parentElement, termType, labelString, selection, style); adapt(element); @@ -816,7 +817,7 @@ public class CdmFormFactory extends FormToolkit { *

* createEnumComboElement *

- * + * * @param enumComboType * a * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType} @@ -842,7 +843,7 @@ public class CdmFormFactory extends FormToolkit { *

* createBrowserElement *

- * + * * @param imageUri * a {@link java.net.URI} object. * @param style @@ -864,7 +865,7 @@ public class CdmFormFactory extends FormToolkit { *

* createImageElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -885,7 +886,7 @@ public class CdmFormFactory extends FormToolkit { *

* createTextActionElement *

- * + * * @param labelString * a {@link java.lang.String} object. * @param initialText @@ -913,7 +914,7 @@ public class CdmFormFactory extends FormToolkit { *

* createCheckbox *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -935,7 +936,7 @@ public class CdmFormFactory extends FormToolkit { /** * Creates a section as a part of the form. - * + * * @return the section widget * @param section * a @@ -1003,7 +1004,7 @@ public class CdmFormFactory extends FormToolkit { *

* createToggleableTextField *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1031,7 +1032,7 @@ public class CdmFormFactory extends FormToolkit { *

* createTimePeriodElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1051,12 +1052,12 @@ public class CdmFormFactory extends FormToolkit { parentElement.addElement(element); return element; } - + /** *

* createGatheringEventUnitElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1070,15 +1071,15 @@ public class CdmFormFactory extends FormToolkit { * object. */ public GatheringEventUnitElement createGatheringEventUnitElement( - ICdmFormElement parentElement, + ICdmFormElement parentElement, String labelString, - DerivedUnitFacade gatheringEvent, - MinMaxTextSection.UnitType unitType, + DerivedUnitFacade gatheringEvent, + MinMaxTextSection.UnitType unitType, int style) { - GatheringEventUnitElement element = new GatheringEventUnitElement(this, + GatheringEventUnitElement element = new GatheringEventUnitElement(this, parentElement, - labelString, - gatheringEvent, + labelString, + gatheringEvent, unitType, style); adapt(element); @@ -1090,7 +1091,7 @@ public class CdmFormFactory extends FormToolkit { *

* createPointElement *

- * + * * @param style * a int. * @param parentElement @@ -1111,7 +1112,7 @@ public class CdmFormFactory extends FormToolkit { *

* createDateDetailSection *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1126,12 +1127,12 @@ public class CdmFormFactory extends FormToolkit { adapt(section); return section; } - + /** *

* createDateDetailSection *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1151,7 +1152,7 @@ public class CdmFormFactory extends FormToolkit { *

* createPartialElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1176,7 +1177,7 @@ public class CdmFormFactory extends FormToolkit { *

* addSelectionListener *

- * + * * @param listener * a {@link org.eclipse.swt.events.SelectionListener} object. */ @@ -1188,7 +1189,7 @@ public class CdmFormFactory extends FormToolkit { *

* removeSelectionListener *

- * + * * @param listener * a {@link org.eclipse.swt.events.SelectionListener} object. */ @@ -1205,7 +1206,7 @@ public class CdmFormFactory extends FormToolkit { *

* addPropertyChangeListener *

- * + * * @param listener * a {@link org.eclipse.jface.util.IPropertyChangeListener} * object. @@ -1221,7 +1222,7 @@ public class CdmFormFactory extends FormToolkit { *

* removePropertyChangeListener *

- * + * * @param listener * a {@link org.eclipse.jface.util.IPropertyChangeListener} * object. @@ -1234,7 +1235,7 @@ public class CdmFormFactory extends FormToolkit { *

* createHorizontalSeparator *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1252,7 +1253,7 @@ public class CdmFormFactory extends FormToolkit { *

* createVersionElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1271,7 +1272,7 @@ public class CdmFormFactory extends FormToolkit { parentElement.addElement(element); return element; } - + /** * @param cdmBaseSection * @param object @@ -1290,7 +1291,7 @@ public class CdmFormFactory extends FormToolkit { *

* createVersionSection *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1306,7 +1307,7 @@ public class CdmFormFactory extends FormToolkit { adapt(section); return section; } - + /** * @param parent * @param i @@ -1323,7 +1324,7 @@ public class CdmFormFactory extends FormToolkit { *

* createEmptyElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1340,7 +1341,7 @@ public class CdmFormFactory extends FormToolkit { *

* createHeadlineSection *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1359,7 +1360,7 @@ public class CdmFormFactory extends FormToolkit { *

* createParsingMessageElement *

- * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -1385,32 +1386,35 @@ public class CdmFormFactory extends FormToolkit { AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement, selectionProvider, style); - + parentElement.addElement(section); adapt(section); return section; - + } - - /** - * @param definedTermClass - * @param formElement - * @param style - * @return - */ - public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass, AbstractCdmDetailSection parentElement, int style) { - AbstractCdmDetailElement element = null; - - if (NamedArea.class.isAssignableFrom(definedTermClass)){ - element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement); + + /** + * @param definedTermClass + * @param formElement + * @param style + * @return + */ + public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass, + AbstractCdmDetailSection parentElement, int style) { + AbstractCdmDetailElement element = null; + + if (NamedArea.class.isAssignableFrom(definedTermClass)) { + element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement); + } else if (definedTermClass.equals(Feature.class)) { + element = new FeatureDetailElement(this, parentElement); } else { - element = new DefinedTermDetailElement(this, parentElement); - } - - adapt(element); - parentElement.addElement(element); - return element; - } + element = new DefinedTermDetailElement(this, parentElement); + } + + adapt(element); + parentElement.addElement(element); + return element; + } //--------DetailSections--------- @@ -1624,7 +1628,7 @@ public class CdmFormFactory extends FormToolkit { addAndAdaptSection(parentElement, section); return section; } - + public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){ GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style); addAndAdaptSection(parentElement, section); @@ -1817,8 +1821,8 @@ public class CdmFormFactory extends FormToolkit { addAndAdaptElement(parentElement, element); return element; } - - + + public GeneralDetailElement createGeneralDetailElement(ICdmFormElement parentElement){ GeneralDetailElement element = new GeneralDetailElement(this, parentElement); addAndAdaptElement(parentElement, element); @@ -2061,7 +2065,7 @@ public class CdmFormFactory extends FormToolkit { *

* createEntityCollectionElement *

- * + * * @param removeListener * a {@link org.eclipse.swt.events.SelectionListener} object. * @param style @@ -2119,24 +2123,24 @@ public class CdmFormFactory extends FormToolkit { } else if (entity instanceof DefinedTerm) { switch(((DefinedTerm)entity).getTermType()) { case Scope: - element = new ScopeElement(this, - parentElement, + element = new ScopeElement(this, + parentElement, (DefinedTerm) entity, - removeListener, + removeListener, style); break; case Modifier: - element = new ModifierElement(this, + element = new ModifierElement(this, parentElement, - (DefinedTerm) entity, - removeListener, + (DefinedTerm) entity, + removeListener, style); break; default: //FIXME : Actually we should through an exception here element = null; break; - + } } else if (entity instanceof Reference) { element = new DescriptionSourceElement(this, parentElement, (Reference) entity, removeListener, style); @@ -2159,19 +2163,19 @@ public class CdmFormFactory extends FormToolkit { case LivingSpecimen: case PreservedSpecimen: case OtherSpecimen: - element = new SpecimenCollectionDetailElement(this, + element = new SpecimenCollectionDetailElement(this, parentElement, - (DerivedUnit) entity, - removeListener, + (DerivedUnit) entity, + removeListener, style); break; default: - element = new DerivedUnitElement(this, + element = new DerivedUnitElement(this, parentElement, - (DerivedUnit) entity, - removeListener, + (DerivedUnit) entity, + removeListener, style); - } + } } else if (entity instanceof NamedArea) { element = new NamedAreaDetailElement(this, parentElement, (NamedArea) entity, removeListener, style); @@ -2225,9 +2229,9 @@ public class CdmFormFactory extends FormToolkit { *
  • {@link NomenclaturalAuthorTeamSelectionElement} see * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)} *
  • - * + * *

    - * + * * @param clazz * a {@link Class} object of the type that you want the selection * element to handle @@ -2253,7 +2257,7 @@ public class CdmFormFactory extends FormToolkit { parentElement.addElement(element); return element; } - + public TaxonNodeSelectionElement createTaxonNodeSelectionElement(ConversationHolder conversation, ICdmFormElement parentElement, String labelString, TaxonNode selection, int mode, int style) { TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement, @@ -2262,7 +2266,7 @@ public class CdmFormFactory extends FormToolkit { parentElement.addElement(element); return element; } - + public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement( ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection, int mode, int style) { @@ -2272,8 +2276,8 @@ public class CdmFormFactory extends FormToolkit { parentElement.addElement(element); return element; } - - + + /** {@inheritDoc} */ public LabelElement createLabel(ICdmFormElement parentElement, String text) { LabelElement labelElement = new LabelElement(this, parentElement, text); @@ -2286,7 +2290,7 @@ public class CdmFormFactory extends FormToolkit { *

    * Getter for the field selectionProvider. *

    - * + * * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object. */ public ISelectionProvider getSelectionProvider() { @@ -2297,7 +2301,7 @@ public class CdmFormFactory extends FormToolkit { *

    * createDetailedDescriptionDetailElement *

    - * + * * @param parentElement * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} * object. @@ -2346,7 +2350,7 @@ public class CdmFormFactory extends FormToolkit { /** * Creates a styled text as a part of the form. - * + * * @param parent * the text parent * @param value diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java new file mode 100644 index 000000000..ee5f287bd --- /dev/null +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java @@ -0,0 +1,85 @@ +// $Id$ +/** +* Copyright (C) 2009 EDIT +* 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. +*/ +package eu.etaxonomy.taxeditor.ui.section.vocabulary; + +import eu.etaxonomy.cdm.model.description.Feature; +import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; +import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; +import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; + +/** + * @author l.morris + * @date 20 Dec 2011 + * + */ +public class FeatureDetailElement extends DefinedTermDetailElement { + + private CheckboxElement supportsTextData; + + private CheckboxElement supportsQuantitativeData; + + private CheckboxElement supportsDistribution; + + private CheckboxElement supportsIndividualAssociation; + + private CheckboxElement supportsTaxonInteraction; + + private CheckboxElement supportsCategoricalData; + + /** + * @param formFactory + * @param formElement + */ + public FeatureDetailElement(CdmFormFactory formFactory, + ICdmFormElement formElement) { + super(formFactory, formElement); + } + + /* (non-Javadoc) + * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.AbstractTermBaseDetailElement#createControls(eu.etaxonomy.taxeditor.ui.element.ICdmFormElement, eu.etaxonomy.cdm.model.common.TermBase, int) + */ + @Override + protected void createControls(ICdmFormElement formElement, Feature entity, int style) { + super.createControls(formElement, entity, style); + supportsTextData = formFactory.createCheckbox(formElement, "Supports Text Data", entity.isSupportsTextData(), style); + supportsQuantitativeData = formFactory.createCheckbox(formElement, "Supports Quantitive Data", entity.isSupportsQuantitativeData(), style); + supportsDistribution = formFactory.createCheckbox(formElement, "Supports Distribution", entity.isSupportsDistribution(), style); + supportsIndividualAssociation = formFactory.createCheckbox(formElement, "Supports Individual Association", entity.isSupportsIndividualAssociation(), style); + supportsTaxonInteraction = formFactory.createCheckbox(formElement, "Supports Taxon Interaction", entity.isSupportsTaxonInteraction(), style); + supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.isSupportsCategoricalData(), style); + } + + /* (non-Javadoc) + * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement#handleEvent(java.lang.Object) + */ + @Override + public void handleEvent(Object eventSource) { + super.handleEvent(eventSource); + if(eventSource == supportsTextData){ + getEntity().setSupportsTextData(supportsTextData.getSelection()); + } + else if(eventSource == supportsQuantitativeData){ + getEntity().setSupportsQuantitativeData(supportsQuantitativeData.getSelection()); + } + else if(eventSource == supportsDistribution){ + getEntity().setSupportsDistribution(supportsDistribution.getSelection()); + } + else if(eventSource == supportsIndividualAssociation){ + getEntity().setSupportsIndividualAssociation(supportsIndividualAssociation.getSelection()); + } + else if(eventSource == supportsTaxonInteraction){ + getEntity().setSupportsTaxonInteraction(supportsTaxonInteraction.getSelection()); + } + else if(eventSource == supportsCategoricalData){ + getEntity().setSupportsCategoricalData(supportsCategoricalData.getSelection()); + } + } + +} -- 2.34.1