Project

General

Profile

« Previous | Next » 

Revision 45a35960

Added by Alex Theys about 12 years ago

AT: commiting latest changes to the Palm Use data extension

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesContentProvider.java
149 149
				Set<Marker> descriptionMarkers = description.getMarkers();
150 150
				if(descriptionMarkers != null) {
151 151
					for (Marker marker: descriptionMarkers) {
152
						//TODO Use the GetbyUUID method
152 153
						if(marker.getMarkerType().getTitleCache().equals("use")) {
153 154
							descriptions.add(description);
154 155
						}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmFormFactory.java
257 257
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
258 258
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailElement;
259 259
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
260
import eu.etaxonomy.taxeditor.ui.section.userecords.UseCategorySection;
260 261
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailElement;
261 262
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
263
import eu.etaxonomy.taxeditor.ui.section.userecords.UseSubCategorySection;
262 264
import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement;
263 265
import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
264 266
import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
......
1841 1843
			element = new DefinedTermDetailElement<NamedAreaLevel>(this,
1842 1844
					parentElement);
1843 1845
			break;
1844
		/*case USE_RECORD:
1845
			element = new UseRecordDetailElement(this, parentElement, style);
1846
			break;*/
1846
		case USE_RECORD:
1847
			//element = new UseRecordDetailElement(this, parentElement, style);
1848
			element = new UseRecordDetailElement(this, parentElement);
1849
			break;
1847 1850
		}
1848 1851

  
1849 1852
		if (element == null) {
......
1865 1868
	 * @version 1.0
1866 1869
	 */
1867 1870
	public static enum EntityDetailType {
1868
		TEAM, TEAMMEMBER, ANNOTATION, CREDIT, DESCRIPTIONELEMENTSOURCE, EXTENSION, MARKER, MEDIA, DESCRIPTIONELEMENTMEDIA, MEDIAREPRESENTATION, MEDIAREPRESENTATIONPART, MODIFIER, NOMENCLATURALSTATUS, NAME_RELATIONSHIP, PROTOLOG, RIGHTS, SOURCE, SCOPE, DESCRIPTIONSOURCE, TYPEDESIGNATION, STATE_DATA, STATISTICAL_MEASUREMENT_VALUE, DESCRIBED_SPECIMEN, COLLECTING_AREA, DETERMINATION_EVENT, SPECIMEN_COLLECTION, IDENTIFIABLE_SOURCE_COLLECTION, GEOGRAPHICAL_SCOPE, SCOPE_RESTRICTION, MEMBER, GRANTED_AUTHORITY, GROUPS_BY_USER, TAXONOMIC_SCOPE, DETERMINATION_CURRENT, DETERMINATION_HISTORY
1871
		TEAM, TEAMMEMBER, ANNOTATION, CREDIT, DESCRIPTIONELEMENTSOURCE, EXTENSION, MARKER, MEDIA, DESCRIPTIONELEMENTMEDIA, MEDIAREPRESENTATION, MEDIAREPRESENTATIONPART, MODIFIER, NOMENCLATURALSTATUS, NAME_RELATIONSHIP, PROTOLOG, RIGHTS, SOURCE, SCOPE, DESCRIPTIONSOURCE, TYPEDESIGNATION, STATE_DATA, STATISTICAL_MEASUREMENT_VALUE, DESCRIBED_SPECIMEN, COLLECTING_AREA, DETERMINATION_EVENT, SPECIMEN_COLLECTION, IDENTIFIABLE_SOURCE_COLLECTION, GEOGRAPHICAL_SCOPE, SCOPE_RESTRICTION, MEMBER, GRANTED_AUTHORITY, GROUPS_BY_USER, TAXONOMIC_SCOPE, DETERMINATION_CURRENT, DETERMINATION_HISTORY, USE_CAT, USE_SUBCAT
1869 1872
	}
1870 1873

  
1871 1874
	/**
......
2028 2031
			section = new TaxonomicScopeSection(this, conversation,
2029 2032
					parentElement, style);
2030 2033
			break;
2034
		case USE_CAT:
2035
			section = new UseCategorySection(this, conversation, parentElement,
2036
					style);
2037
			break;
2038
		case USE_SUBCAT:
2039
			section = new UseSubCategorySection(this, conversation, parentElement,
2040
					style);
2041
			break;
2031 2042
		}
2032 2043
		parentElement.addElement(section);
2033 2044
		adapt(section);
......
2428 2439

  
2429 2440
	}
2430 2441

  
2431
	public AbstractDetailedDescriptionDetailElement createUseRecordDetailElement(
2442
	/*public AbstractDetailedDescriptionDetailElement createUseRecordDetailElement(
2432 2443
			ICdmFormElement parentElement, DescriptionElementBase entity,
2433 2444
			int style) {
2434 2445
		AbstractDetailedDescriptionDetailElement useRecordElement = null;
......
2442 2453
		adapt(useRecordElement);
2443 2454
		parentElement.addElement(useRecordElement);
2444 2455
		return useRecordElement;
2445
	}
2456
	}*/
2446 2457

  
2447 2458
	/**
2448 2459
	 * Creates a styled text as a part of the form.
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailElement.java
5 5

  
6 6
import eu.etaxonomy.cdm.model.description.CategoricalData;
7 7
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
8
import eu.etaxonomy.cdm.model.description.State;
9
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
8 10
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
9 11
import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
10 12
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
......
14 16
import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
15 17
import eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement;
16 18

  
17
public class UseRecordDetailElement extends AbstractDetailedDescriptionDetailElement<CategoricalData> {
19
//public class UseRecordDetailElement extends AbstractDetailedDescriptionDetailElement<CategoricalData> {
20
public class UseRecordDetailElement extends AbstractCdmDetailElement<CategoricalData> {
21

  
18 22
	
19 23
	private static final Logger logger = Logger
20 24
			.getLogger(DescriptionElementDetailElement.class);
21 25
	
22 26
	private CheckboxElement checkbox_orderRelevant;
23
	private StateDataSection section_stateData;
27
	private TermComboElement UseCategory_stateData;
28
	private UseSubCategorySection UseSubCategory_stateData;
24 29
	//private AbstractDetailedDescriptionDetailElement detailElement;
25 30
	
26
	public UseRecordDetailElement(CdmFormFactory formFactory,
31
	/*public UseRecordDetailElement(CdmFormFactory formFactory,
27 32
			ICdmFormElement formElement, CategoricalData entity, int style) {
28 33
		super(formFactory, formElement, entity, style);
34
	}*/
35
	/*public UseRecordDetailElement(CdmFormFactory formFactory,
36
			ICdmFormElement formElement, int style) {*/
37
	public UseRecordDetailElement(CdmFormFactory formFactory,
38
			ICdmFormElement formElement) {
39
		super(formFactory, formElement);
29 40
	}
30 41
	
31 42
	/** {@inheritDoc} */
32 43
	@Override
33 44
	protected void createControls(ICdmFormElement formElement,
34 45
			CategoricalData entity, int style) {
35
		checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style);
36
		section_stateData = (StateDataSection) formFactory.createEntityDetailSection(EntityDetailType.STATE_DATA, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED);
37
		section_stateData.setEntity(entity);
38
		section_stateData.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
46
		
47
		
48
		State state = State.NewInstance("Tato", "Toto", "Titi");
49
		//checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style);
50
		UseCategory_stateData = formFactory.createTermComboElement(State.class, this, "Use Category", state , style);
51
		//createEntityDetailSection(EntityDetailType.USE_CAT, getConversationHolder(), formElement, Section.EXPANDED);
52
		UseSubCategory_stateData = (UseSubCategorySection) formFactory.createEntityDetailSection(EntityDetailType.USE_SUBCAT, getConversationHolder(), formElement,Section.EXPANDED);
53
		//UseCategory_stateData.setEntity(entity);
54
		UseSubCategory_stateData.setEntity(entity);
55
		//UseCategory_stateData.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
56
		UseSubCategory_stateData.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
57
		
39 58
	}
40 59
	
41 60
	

Also available in: Unified diff