\r
private StateVocabularyCollectionSection sectionStateVocabularies;\r
\r
+ private MeasurementUnitCollectionSection sectionMeasurementUnits;\r
+\r
/**\r
* @param formFactory\r
* @param formElement\r
supportsCommonTaxonName = formFactory.createCheckbox(formElement, "Supports Common Taxon Name", entity.isSupportsCommonTaxonName(), style);\r
\r
if(supportsCategoricalData.getSelection()){\r
- sectionStateVocabularies = formFactory.createSectionStateVocabularies(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionStateVocabularies.setEntity(getEntity());\r
}\r
+ if(supportsQuantitativeData.getSelection()){\r
+ sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+ sectionMeasurementUnits.setEntity(getEntity());\r
+ }\r
}\r
\r
/* (non-Javadoc)\r
}\r
else if(eventSource == supportsQuantitativeData){\r
getEntity().setSupportsQuantitativeData(supportsQuantitativeData.getSelection());\r
+ if(supportsQuantitativeData.getSelection()){\r
+ sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+ sectionMeasurementUnits.setEntity(getEntity());\r
+ }\r
+ else{\r
+ if(sectionMeasurementUnits!=null){\r
+ removeElementsAndControls(sectionMeasurementUnits);\r
+ }\r
+ }\r
}\r
else if(eventSource == supportsDistribution){\r
getEntity().setSupportsDistribution(supportsDistribution.getSelection());\r
else if(eventSource == supportsCategoricalData){\r
getEntity().setSupportsCategoricalData(supportsCategoricalData.getSelection());\r
if(supportsCategoricalData.getSelection()){\r
- sectionStateVocabularies = formFactory.createSectionStateVocabularies(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionStateVocabularies.setEntity(getEntity());\r
}\r