Project

General

Profile

Revision f8596f2d

IDf8596f2d6fdfa729bb637142ba6340e150406772
Parent 3d7968a9
Child c8236d99

Added by Patrick Plitzner 6 months ago

ref #8121 Add structural modifier element to character detail element

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/CharacterDetailElement.java
11 11
import org.eclipse.swt.widgets.Label;
12 12
import org.eclipse.ui.forms.widgets.ExpandableComposite;
13 13

  
14
import eu.etaxonomy.cdm.model.common.DefinedTerm;
14 15
import eu.etaxonomy.cdm.model.common.Language;
15 16
import eu.etaxonomy.cdm.model.common.Representation;
17
import eu.etaxonomy.cdm.model.common.TermType;
16 18
import eu.etaxonomy.cdm.model.description.Character;
17 19
import eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester;
18 20
import eu.etaxonomy.taxeditor.model.ColorResources;
19 21
import eu.etaxonomy.taxeditor.preference.Resources;
20 22
import eu.etaxonomy.taxeditor.store.CdmStore;
23
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
21 24
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
22 25
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
23 26
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
......
41 44

  
42 45
    protected RepresentationElement element_Representation;
43 46

  
47
    private TermComboElement<DefinedTerm> comboStructuralModifier;
48

  
44 49
    private CheckboxElement supportsQuantitativeData;
45 50

  
46 51
    private CheckboxElement supportsCategoricalData;
......
72 77
	    Label lblPropertyText = new Label(formElement.getLayoutComposite(), style);
73 78
	    lblPropertyText.setForeground(ColorResources.getColor(Resources.BLACK));
74 79
	    lblPropertyText.setText(entity.getProperty().getTerm().getLabel());
80

  
81
        comboStructuralModifier = formFactory.createDefinedTermComboElement(TermType.StructureModifier, formElement, "Structural Modifier", entity.getStructureModifier(), style);
82

  
75 83
	    supportsQuantitativeData = formFactory.createCheckbox(formElement, "Supports Quantitative Data", entity.isSupportsQuantitativeData(), style);
76 84
	    supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.isSupportsCategoricalData(), style);
77 85

  
......
110 118

  
111 119
	@Override
112 120
	public void handleEvent(Object eventSource) {
121
	    if(eventSource == comboStructuralModifier){
122
	        getEntity().setStructureModifier(comboStructuralModifier.getSelection());
123
	    }
113 124
	    if(eventSource == supportsQuantitativeData || eventSource == supportsCategoricalData){
114 125
	        //if any type is selected disable supportsTextData
115 126
	        getEntity().setSupportsTextData(false);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)