Revision 45f81765
Added by Katja Luther almost 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.taxeditor.ui.section.vocabulary; |
10 | 10 |
|
11 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
|
12 |
|
|
11 | 13 |
import eu.etaxonomy.cdm.model.description.Feature; |
12 | 14 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
13 | 15 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
14 | 16 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
15 | 17 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
18 |
import eu.etaxonomy.taxeditor.ui.element.LabelElement; |
|
16 | 19 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
17 | 20 |
|
18 | 21 |
/** |
... | ... | |
67 | 70 |
protected void createControls(ICdmFormElement formElement, Feature entity, int style) { |
68 | 71 |
super.createControls(formElement, entity, style); |
69 | 72 |
this.parentFormElement = formElement; |
70 |
supportsTextData = formFactory.createCheckbox(formElement, "Supports Text Data", entity.isSupportsTextData(), style); |
|
71 |
supportsQuantitativeData = formFactory.createCheckbox(formElement, "Supports Quantitative Data", entity.isSupportsQuantitativeData(), style); |
|
72 |
supportsDistribution = formFactory.createCheckbox(formElement, "Supports Distribution", entity.isSupportsDistribution(), style); |
|
73 |
supportsIndividualAssociation = formFactory.createCheckbox(formElement, "Supports Individual Association", entity.isSupportsIndividualAssociation(), style); |
|
74 |
supportsTaxonInteraction = formFactory.createCheckbox(formElement, "Supports Taxon Interaction", entity.isSupportsTaxonInteraction(), style); |
|
75 |
supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.isSupportsCategoricalData(), style); |
|
76 |
supportsCommonTaxonName = formFactory.createCheckbox(formElement, "Supports Common Taxon Name", entity.isSupportsCommonTaxonName(), style); |
|
77 |
supportsTemporalData = formFactory.createCheckbox(formElement, "Supports Temporal Data", entity.isSupportsTemporalData(), style); |
|
73 |
LabelElement supportsLabel = formFactory.createLabel(formElement, "Supports"); |
|
74 |
supportsLabel.setBold(); |
|
75 |
supportsTextData = formFactory.createCheckbox(formElement, "Text Data", entity.isSupportsTextData(), style); |
|
76 |
supportsCategoricalData = formFactory.createCheckbox(formElement, "Categorical Data", entity.isSupportsCategoricalData(), style); |
|
77 |
supportsQuantitativeData = formFactory.createCheckbox(formElement, "Quantitative Data", entity.isSupportsQuantitativeData(), style); |
|
78 |
supportsDistribution = formFactory.createCheckbox(formElement, "Distribution", entity.isSupportsDistribution(), style); |
|
79 |
supportsIndividualAssociation = formFactory.createCheckbox(formElement, "Individual Association", entity.isSupportsIndividualAssociation(), style); |
|
80 |
supportsTaxonInteraction = formFactory.createCheckbox(formElement, "Taxon Interaction", entity.isSupportsTaxonInteraction(), style); |
|
81 |
supportsCommonTaxonName = formFactory.createCheckbox(formElement, "Common Taxon Name", entity.isSupportsCommonTaxonName(), style); |
|
82 |
supportsTemporalData = formFactory.createCheckbox(formElement, "Temporal Data", entity.isSupportsTemporalData(), style); |
|
78 | 83 |
|
79 | 84 |
if (supportsCategoricalData.getSelection()) { |
80 | 85 |
sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(), |
... | ... | |
101 | 106 |
sectionModifierVocabularies.setEntity(getEntity()); |
102 | 107 |
} |
103 | 108 |
|
104 |
availableForTaxon = formFactory.createCheckbox(formElement, "Available for Taxon", entity.isAvailableForTaxon(), style); |
|
105 |
availableForTaxonName = formFactory.createCheckbox(formElement, "Available for Taxon Name", entity.isAvailableForTaxonName(), style); |
|
106 |
availableForSpecimenOrObservation = formFactory.createCheckbox(formElement, "Available for Occurrence", entity.isAvailableForOccurrence(), style); |
|
109 |
LabelElement noLabel = formFactory.createLabel(formElement, ""); |
|
110 |
|
|
111 |
TableWrapData data = LayoutConstants.FILL_HORIZONTALLY(2, 1); |
|
112 |
data.maxHeight = 3; |
|
113 |
noLabel.setLayout(data); |
|
114 |
LabelElement availableLabel = formFactory.createLabel(formElement, "Available for"); |
|
115 |
availableLabel.setBold(); |
|
116 |
|
|
117 |
availableForTaxon = formFactory.createCheckbox(formElement, "Taxon", entity.isAvailableForTaxon(), style); |
|
118 |
availableForTaxonName = formFactory.createCheckbox(formElement, "Taxon Name", entity.isAvailableForTaxonName(), style); |
|
119 |
availableForSpecimenOrObservation = formFactory.createCheckbox(formElement, "Occurrence", entity.isAvailableForOccurrence(), style); |
|
107 | 120 |
} |
108 | 121 |
|
109 | 122 |
/* (non-Javadoc) |
Also available in: Unified diff
fix #9032: layout issues in feature details view