Project

General

Profile

« Previous | Next » 

Revision b0ce5b17

Added by Patrick Plitzner over 10 years ago

merged trunk into branch

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
33 33
import org.eclipse.swt.widgets.Event;
34 34
import org.eclipse.swt.widgets.Label;
35 35
import org.eclipse.ui.forms.IFormColors;
36
import org.eclipse.ui.forms.widgets.ExpandableComposite;
36 37
import org.eclipse.ui.forms.widgets.FormToolkit;
37 38
import org.eclipse.ui.forms.widgets.Section;
38 39
import org.eclipse.ui.internal.forms.widgets.FormFonts;
......
95 96
import eu.etaxonomy.cdm.model.taxon.Taxon;
96 97
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
97 98
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
98
import eu.etaxonomy.taxeditor.store.StoreUtil;
99
import eu.etaxonomy.taxeditor.model.AbstractUtility;
99 100
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
100 101
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
101 102
import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
......
119 120
import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailSection;
120 121
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailElement;
121 122
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailSection;
123
import eu.etaxonomy.taxeditor.ui.section.common.ReferenceEntityDetailElement;
122 124
import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
123
import eu.etaxonomy.taxeditor.ui.section.common.RefereneEntityDetailElement;
124 125
import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
125 126
import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
126 127
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailElement;
......
132 133
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
133 134
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceElement;
134 135
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
136
import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
135 137
import eu.etaxonomy.taxeditor.ui.section.description.ModifierElement;
136 138
import eu.etaxonomy.taxeditor.ui.section.description.ModifierSection;
137 139
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageDetailElement;
......
269 271
	private MouseListener selectionMouseHandler;
270 272
	private FocusListener selectionFocusHandler;
271 273

  
272
	private final Set selectionListenerList = new HashSet();
274
    private final Set<SelectionListener> selectionListenerList = new HashSet<SelectionListener>();
273 275

  
274 276
	private final List<IPropertyChangeListener> propertyChangeListeners = new ArrayList<IPropertyChangeListener>();
275 277

  
......
315 317
		event.widget = e.widget;
316 318
		SelectionEvent selectionEvent = new SelectionEvent(event);
317 319

  
318
		for (Object listener : selectionListenerList) {
319
			((SelectionListener) listener).widgetSelected(selectionEvent);
320
        for (SelectionListener listener : selectionListenerList) {
321
            listener.widgetSelected(selectionEvent);
320 322
		}
321 323
	}
322 324

  
......
370 372
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
371 373
	 *         object.
372 374
	 */
373
	public SelectionArbitrator createSelectionArbitrator(
374
			IEntityElement entityElement) {
375
		SelectionArbitrator selectionArbitrator = new SelectionArbitrator(
376
				entityElement);
375
    public SelectionArbitrator createSelectionArbitrator(IEntityElement entityElement) {
376
        SelectionArbitrator selectionArbitrator = new SelectionArbitrator(entityElement);
377 377
		selectionArbitrator.addSelectionProvider(selectionProvider);
378 378
		selectionProvider.addSelectionChangedListener(selectionArbitrator);
379 379
		addSelectionListener(selectionArbitrator);
......
386 386
	 * </p>
387 387
	 * 
388 388
	 * @param selectionArbitrator
389
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
389
     *            a
390
     *            {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
390 391
	 *            object.
391 392
	 */
392
	public void destroySelectionArbitrator(
393
			SelectionArbitrator selectionArbitrator) {
393
    public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator) {
394 394
		removeSelectionListener(selectionArbitrator);
395 395
		if (selectionProvider != null) {
396
			selectionProvider
397
					.removeSelectionChangedListener(selectionArbitrator);
396
            selectionProvider.removeSelectionChangedListener(selectionArbitrator);
398 397
		} else {
399
			StoreUtil
400
					.error(this.getClass(),
401
							"Tried to destroy a selection listener from this factories listeners but was null",
402
							null);
398
            AbstractUtility.error(this.getClass(),
399
                    "Tried to destroy a selection listener from this factories listeners but was null", null);
403 400
		}
404 401
	}
405 402

  
......
412 409

  
413 410
	/**
414 411
	 * <p>
415
	 * adapt
412
     * Adapts the {@link AbstractCdmFormElement}:<br>
413
     * - sets the {@link IPropertyChangeListener}s handled by this class
416 414
	 * </p>
417 415
	 * 
418 416
	 * @param formElement
......
449 447
		}
450 448
		// destroy selection arbitrator, if any
451 449
		if (formElement instanceof ISelectableElement) {
452
			destroySelectionArbitrator(((ISelectableElement) formElement)
453
					.getSelectionArbitrator());
450
            destroySelectionArbitrator(((ISelectableElement) formElement).getSelectionArbitrator());
454 451
		}
455 452
		// remove this element form its parents list of elements
456 453
		// ICdmFormElement parentElement = formElement.getParentElement();
......
505 502
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
506 503
	 *         object.
507 504
	 */
508
	public TextWithLabelElement createMultilineTextWithLabel(
509
			ICdmFormElement parentElement, String labelString, int textHeight,
510
			int style) {
511
		TextWithLabelElement element = new TextWithLabelElement(this,
512
				parentElement, labelString, "", textHeight, style);
505
    public TextWithLabelElement createMultilineTextWithLabel(ICdmFormElement parentElement, String labelString,
506
            int textHeight, int style) {
507
        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, style);
513 508
		adapt(element);
514 509
		parentElement.addElement(element);
515 510
		return element;
......
535 530
	 *         {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
536 531
	 *         object.
537 532
	 */
538
	public MultilanguageTextElement createMultiLanguageTextElement(
539
			ICdmFormElement parentElement, String labelString,
540
			Map<Language, LanguageString> multilanguageText, int textHeight,
541
			int style) {
542
		MultilanguageTextElement element = new MultilanguageTextElement(this,
543
				parentElement, labelString, multilanguageText, textHeight,
544
				style);
533
    public MultilanguageTextElement createMultiLanguageTextElement(ICdmFormElement parentElement, String labelString,
534
            Map<Language, LanguageString> multilanguageText, int textHeight, int style) {
535
        MultilanguageTextElement element = new MultilanguageTextElement(this, parentElement, labelString,
536
                multilanguageText, textHeight, style);
545 537
		adapt(element);
546 538
		parentElement.addElement(element);
547 539
		return element;
548 540
	}
549 541

  
550
	public KeyStatementElement createKeyStatementElement(
551
			ICdmFormElement parentElement, String labelString,
542
    public KeyStatementElement createKeyStatementElement(ICdmFormElement parentElement, String labelString,
552 543
			KeyStatement keyStatement, int textHeight, int style) {
553
		KeyStatementElement element = new KeyStatementElement(this,
554
				parentElement, labelString, keyStatement, textHeight, style);
544
        KeyStatementElement element = new KeyStatementElement(this, parentElement, labelString, keyStatement,
545
                textHeight, style);
555 546
		adapt(element);
556 547
		parentElement.addElement(element);
557 548
		return element;
......
574 565
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
575 566
	 *         object.
576 567
	 */
577
	public TextWithLabelElement createTextWithLabelElement(
578
			ICdmFormElement parentElement, String labelString,
568
    public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
579 569
			String initialText, int style) {
580
		TextWithLabelElement element = new TextWithLabelElement(this,
581
				parentElement, labelString, initialText, null, style);
570
        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null,
571
                style);
582 572
		adapt(element);
583 573
		parentElement.addElement(element);
584 574
		return element;
585 575
	}
586 576

  
587
	public UriWithLabelElement createUriWithLabelElement(
588
			ICdmFormElement parentElement, String labelString, URI initialUri,
589
			int style) {
590
		UriWithLabelElement element = new UriWithLabelElement(this,
591
				parentElement, labelString, initialUri, null, style);
577
    public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
578
            URI initialUri, int style) {
579
        UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, null, style);
592 580
		adapt(element);
593 581
		parentElement.addElement(element);
594 582
		return element;
......
601 589
	 * @param style
602 590
	 * @return
603 591
	 */
604
	public OpenUrlSelectorElement createOpenUrlSelectorElement(
605
			ICdmFormElement parentElement, String labelString,
592
    public OpenUrlSelectorElement createOpenUrlSelectorElement(ICdmFormElement parentElement, String labelString,
606 593
			IOpenUrlEnabled openUrlEnabled, int style) {
607
		OpenUrlSelectorElement element = new OpenUrlSelectorElement(this,
608
				parentElement, labelString, openUrlEnabled, style);
594
        OpenUrlSelectorElement element = new OpenUrlSelectorElement(this, parentElement, labelString, openUrlEnabled,
595
                style);
609 596
		adapt(element);
610 597
		parentElement.addElement(element);
611 598
		return element;
......
620 607
	 * @param style
621 608
	 * @return
622 609
	 */
623
	public EditPasswordElement createEditPasswordElement(
624
			ICdmFormElement parentElement, String labelString,
610
    public EditPasswordElement createEditPasswordElement(ICdmFormElement parentElement, String labelString,
625 611
			ConversationHolder conversation, User user, int style) {
626
		EditPasswordElement element = new EditPasswordElement(this,
627
				parentElement, labelString, user, conversation);
612
        EditPasswordElement element = new EditPasswordElement(this, parentElement, labelString, user, conversation);
628 613
		adapt(element);
629 614
		parentElement.addElement(element);
630 615
		return element;
......
644 629
	 *            a {@link java.lang.Integer} object.
645 630
	 * @param style
646 631
	 *            a int.
647
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
632
     * @return a
633
     *         {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
648 634
	 *         object.
649 635
	 */
650 636
	public NumberWithLabelElement createNumberTextWithLabelElement(
......
676 662
	 *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
677 663
	 *         object.
678 664
	 */
679
	public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
680
			ICdmFormElement parentElement, String labelString,
681
			LanguageString languageString, int style) {
682
		LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(
683
				this, parentElement, labelString, languageString, style);
665
    public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
666
            String labelString, LanguageString languageString, int style) {
667
        LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
668
                languageString, style);
684 669
		adapt(element);
685 670
		parentElement.addElement(element);
686 671
		return element;
......
706 691
	 *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
707 692
	 *         object.
708 693
	 */
709
	public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
710
			ICdmFormElement parentElement, String labelString,
711
			LanguageString languageString, int height, int style) {
712
		LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(
713
				this, parentElement, labelString, languageString, height, style);
694
    public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
695
            String labelString, LanguageString languageString, int height, int style) {
696
        LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
697
                languageString, height, style);
714 698
		adapt(element);
715 699
		parentElement.addElement(element);
716 700
		return element;
......
731 715
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
732 716
	 *         object.
733 717
	 */
734
	public TextWithLabelElement createTextElement(
735
			ICdmFormElement parentElement, String initialText, int style) {
736
		TextWithLabelElement element = new TextWithLabelElement(this,
737
				parentElement, null, initialText, null, style);
718
    public TextWithLabelElement createTextElement(ICdmFormElement parentElement, String initialText, int style) {
719
        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, null, initialText, null, style);
738 720
		adapt(element);
739 721
		parentElement.addElement(element);
740 722
		return element;
......
757 739
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
758 740
	 *         object.
759 741
	 */
760
	public KeyValueViewerElement createKeyValueViewerElement(
761
			ICdmFormElement parentElement, String keyHeading,
742
    public KeyValueViewerElement createKeyValueViewerElement(ICdmFormElement parentElement, String keyHeading,
762 743
			String valueHeading, Map<Object, Object> map) {
763
		KeyValueViewerElement element = new KeyValueViewerElement(this,
764
				parentElement, keyHeading, valueHeading, map);
744
        KeyValueViewerElement element = new KeyValueViewerElement(this, parentElement, keyHeading, valueHeading, map);
765 745
		adapt(element);
766 746
		parentElement.addElement(element);
767 747
		return element;
......
790 770
	 *         object.
791 771
	 */
792 772
	
793
	public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(
794
			Class<T> termComboType, ICdmFormElement parentElement,
795
			String labelString, T selection, int style) {
796
		TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString, selection, style);
773
    public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(Class<T> termComboType,
774
            ICdmFormElement parentElement, String labelString, T selection, int style) {
775
        TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString,
776
                selection, style);
797 777
		adapt(element);
798 778
		parentElement.addElement(element);
799 779
		return element;
......
872 852
	 * @param parentElement
873 853
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
874 854
	 *            object.
875
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement} object.
855
     * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
856
     *         object.
876 857
	 */
877
	public BrowserElement createBrowserElement(ICdmFormElement parentElement,
878
			URI imageUri, int style) {
879
		BrowserElement element = new BrowserElement(this, parentElement,
880
				imageUri, style);
858
    public BrowserElement createBrowserElement(ICdmFormElement parentElement, URI imageUri, int style) {
859
        BrowserElement element = new BrowserElement(this, parentElement, imageUri, style);
881 860
		adapt(element);
882 861
		parentElement.addElement(element);
883 862
		return element;
......
897 876
	 *            a int.
898 877
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
899 878
	 */
900
	public ImageElement createImageElement(ICdmFormElement parentElement,
901
			URI imageUri, int style) {
902
		ImageElement element = new ImageElement(this, parentElement, imageUri,
903
				style);
879
    public ImageElement createImageElement(ICdmFormElement parentElement, URI imageUri, int style) {
880
        ImageElement element = new ImageElement(this, parentElement, imageUri, style);
904 881
		adapt(element);
905 882
		parentElement.addElement(element);
906 883
		return element;
......
925 902
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
926 903
	 *         object.
927 904
	 */
928
	public TextActionElement createTextActionElement(
929
			ICdmFormElement parentElement, String labelString,
905
    public TextActionElement createTextActionElement(ICdmFormElement parentElement, String labelString,
930 906
			String buttonLabel, String initialText, int style) {
931
		TextActionElement element = new TextActionElement(this, parentElement,
932
				labelString, buttonLabel, initialText, style);
907
        TextActionElement element = new TextActionElement(this, parentElement, labelString, buttonLabel, initialText,
908
                style);
933 909
		adapt(element);
934 910
		parentElement.addElement(element);
935 911
		return element;
......
949 925
	 *            a boolean.
950 926
	 * @param style
951 927
	 *            a int.
952
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement} object.
928
     * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
929
     *         object.
953 930
	 */
954
	public CheckboxElement createCheckbox(ICdmFormElement parentElement,
955
			String label, boolean initialState, int style) {
956
		CheckboxElement element = new CheckboxElement(this, parentElement,
957
				label, initialState, style | orientation);
931
    public CheckboxElement createCheckbox(ICdmFormElement parentElement, String label, boolean initialState, int style) {
932
        CheckboxElement element = new CheckboxElement(this, parentElement, label, initialState, style | orientation);
958 933
		adapt(element);
959 934
		parentElement.addElement(element);
960 935
		return element;
......
965 940
	 * 
966 941
	 * @return the section widget
967 942
	 * @param section
968
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
943
     *            a
944
     *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
969 945
	 *            object.
970 946
	 */
971 947
	public Section adapt(AbstractFormSection section) {
......
977 953
		section.setPropertyChangeListeners(propertyChangeListeners);
978 954

  
979 955
		if (section.getToggle() != null) {
980
			section.getToggle().setHoverDecorationColor(
981
					getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
982
			section.getToggle().setDecorationColor(
983
					getColors().getColor(IFormColors.TB_TOGGLE));
956
            section.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
957
            section.getToggle().setDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE));
984 958
		}
985 959

  
986
		section.setFont(boldFontHolder2.getBoldFont(section
987
				.getLayoutComposite().getFont()));
960
        section.setFont(boldFontHolder2.getBoldFont(section.getLayoutComposite().getFont()));
988 961

  
989
		if ((section.getStyle() & Section.TITLE_BAR) != 0
990
				|| (section.getStyle() & Section.SHORT_TITLE_BAR) != 0) {
962
        if ((section.getStyle() & ExpandableComposite.TITLE_BAR) != 0
963
                || (section.getStyle() & ExpandableComposite.SHORT_TITLE_BAR) != 0) {
991 964
			getColors().initializeSectionToolBarColors();
992
			section.setTitleBarBackground(getColors().getColor(
993
					IFormColors.TB_BG));
994
			section.setTitleBarBorderColor(getColors().getColor(
995
					IFormColors.TB_BORDER));
965
            section.setTitleBarBackground(getColors().getColor(IFormColors.TB_BG));
966
            section.setTitleBarBorderColor(getColors().getColor(IFormColors.TB_BORDER));
996 967
		}
997 968
		// call setTitleBarForeground regardless as it also sets the label color
998
		section.setTitleBarForeground(getColors().getColor(
999
				IFormColors.TB_TOGGLE));
969
        section.setTitleBarForeground(getColors().getColor(IFormColors.TB_TOGGLE));
1000 970
		return section;
1001 971
	}
1002 972

  
......
1019 989
				dispose();
1020 990
			}
1021 991
			if (boldFont == null) {
1022
				boldFont = FormFonts.getInstance().getBoldFont(
1023
						getColors().getDisplay(), normalFont);
992
                boldFont = FormFonts.getInstance().getBoldFont(getColors().getDisplay(), normalFont);
1024 993
			}
1025 994
		}
1026 995

  
1027 996
		public void dispose() {
1028 997
			if (boldFont != null) {
1029
				FormFonts.getInstance().markFinished(boldFont,
1030
						getColors().getDisplay());
998
                FormFonts.getInstance().markFinished(boldFont, getColors().getDisplay());
1031 999
				boldFont = null;
1032 1000
			}
1033 1001
		}
......
1052 1020
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1053 1021
	 *         object.
1054 1022
	 */
1055
	public ToggleableTextElement createToggleableTextField(
1056
			ICdmFormElement parentElement, String labelString,
1023
    public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
1057 1024
			String initialText, boolean initialState, int style) {
1058
		ToggleableTextElement element = new ToggleableTextElement(this,
1059
				parentElement, labelString, initialText, initialState, style
1060
						| orientation);
1025
        ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText,
1026
                initialState, style | orientation);
1061 1027
		adapt(element);
1062 1028
		parentElement.addElement(element);
1063 1029
		return element;
......
1080 1046
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1081 1047
	 *         object.
1082 1048
	 */
1083
	public TimePeriodElement createTimePeriodElement(
1084
			ICdmFormElement parentElement, String labelString,
1049
    public TimePeriodElement createTimePeriodElement(ICdmFormElement parentElement, String labelString,
1085 1050
			TimePeriod timePeriod, int style) {
1086
		TimePeriodElement element = new TimePeriodElement(this, parentElement,
1087
				labelString, timePeriod, style);
1051
        TimePeriodElement element = new TimePeriodElement(this, parentElement, labelString, timePeriod, style);
1088 1052
		adapt(element);
1089 1053
		parentElement.addElement(element);
1090 1054
		return element;
......
1138 1102
	 *            a {@link eu.etaxonomy.cdm.model.location.Point} object.
1139 1103
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1140 1104
	 */
1141
	public PointElement createPointElement(ICdmFormElement parentElement,
1142
			Point point, int style) {
1143
		PointElement element = new PointElement(this, parentElement, point,
1144
				style);
1105
    public PointElement createPointElement(ICdmFormElement parentElement, Point point, int style) {
1106
        PointElement element = new PointElement(this, parentElement, point, style);
1145 1107
		adapt(element);
1146 1108
		parentElement.addElement(element);
1147 1109
		return element;
......
1160 1122
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1161 1123
	 *         object.
1162 1124
	 */
1163
	public DateDetailSection createDateDetailSection(
1164
			ICdmFormElement parentElement, int style) {
1165
		DateDetailSection section = new DateDetailSection(this, parentElement,
1166
				style);
1125
    public DateDetailSection createDateDetailSection(ICdmFormElement parentElement, int style) {
1126
        DateDetailSection section = new DateDetailSection(this, parentElement, style);
1167 1127
		parentElement.addElement(section);
1168 1128
		adapt(section);
1169 1129
		return section;
......
1203 1163
	 *            a {@link org.joda.time.Partial} object.
1204 1164
	 * @param style
1205 1165
	 *            a int.
1206
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement} object.
1166
     * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1167
     *         object.
1207 1168
	 */
1208
	public PartialElement createPartialElement(ICdmFormElement parentElement,
1209
			String labelString, Partial partial, int style) {
1210
		PartialElement element = new PartialElement(this, parentElement,
1211
				labelString, style);
1169
    public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial,
1170
            int style) {
1171
        PartialElement element = new PartialElement(this, parentElement, labelString, style);
1212 1172
		adapt(element);
1213 1173
		parentElement.addElement(element);
1214 1174
		return element;
......
1236 1196
	 */
1237 1197
	public void removeSelectionListener(SelectionListener listener) {
1238 1198
		if (listener == null) {
1239
			StoreUtil
1240
					.error(this.getClass(),
1241
							"Tried to remove a selection listener from this factories listeners but was null",
1242
							null);
1199
            AbstractUtility.error(this.getClass(),
1200
                    "Tried to remove a selection listener from this factories listeners but was null", null);
1243 1201
		} else {
1244 1202
			selectionListenerList.remove(listener);
1245 1203
		}
......
1286 1244
	 *            a int.
1287 1245
	 * @return a {@link org.eclipse.swt.widgets.Label} object.
1288 1246
	 */
1289
	public Label createHorizontalSeparator(ICdmFormElement parentElement,
1290
			int style) {
1291
		Label separator = this.createSeparator(
1292
				parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
1247
    public Label createHorizontalSeparator(ICdmFormElement parentElement, int style) {
1248
        Label separator = this.createSeparator(parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
1293 1249
		separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
1294 1250
		return separator;
1295 1251
	}
......
1311 1267
	 *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1312 1268
	 *         object.
1313 1269
	 */
1314
	public VersionElement createVersionElement(ICdmFormElement parentElement,
1315
			VersionableEntity entity, int style) {
1316
		VersionElement element = new VersionElement(this, parentElement,
1317
				entity, style);
1270
    public VersionElement createVersionElement(ICdmFormElement parentElement, VersionableEntity entity, int style) {
1271
        VersionElement element = new VersionElement(this, parentElement, entity, style);
1318 1272
		adapt(element);
1319 1273
		parentElement.addElement(element);
1320 1274
		return element;
......
1326 1280
	 * @param style
1327 1281
	 * @return
1328 1282
	 */
1329
	public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement,
1330
			CdmBase entity, int style) {
1331
		CdmBaseElement element = new CdmBaseElement(this, parentElement,
1332
				entity, style);
1283
    public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement, CdmBase entity, int style) {
1284
        CdmBaseElement element = new CdmBaseElement(this, parentElement, entity, style);
1333 1285
		adapt(element);
1334 1286
		parentElement.addElement(element);
1335 1287
		return element;
......
1350 1302
	 *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1351 1303
	 *         object.
1352 1304
	 */
1353
	public VersionSection createVersionSection(ICdmFormElement parentElement,
1354
			int style) {
1305
    public VersionSection createVersionSection(ICdmFormElement parentElement, int style) {
1355 1306
		VersionSection section = new VersionSection(this, parentElement, style);
1356 1307
		parentElement.addElement(section);
1357 1308
		adapt(section);
......
1381 1332
	 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1382 1333
	 */
1383 1334
	public EmptyElement createEmptyElement(ICdmFormElement parentElement) {
1384
		EmptyElement element = new EmptyElement(this, parentElement, null,
1385
				SWT.NULL);
1335
        EmptyElement element = new EmptyElement(this, parentElement, null, SWT.NULL);
1386 1336
		adapt(element);
1387 1337
		parentElement.addElement(element);
1388 1338
		return element;
......
1401 1351
	 *         object.
1402 1352
	 */
1403 1353
	public HeadlineSection createHeadlineSection(ICdmFormElement parentElement) {
1404
		HeadlineSection section = new HeadlineSection(this, parentElement,
1405
				SWT.NULL);
1354
        HeadlineSection section = new HeadlineSection(this, parentElement, SWT.NULL);
1406 1355
		parentElement.addElement(section);
1407 1356
		adapt(section);
1408 1357
		return section;
......
1425 1374
	 *         {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1426 1375
	 *         object.
1427 1376
	 */
1428
	public ParsingMessageElement createParsingMessageElement(
1429
			ICdmFormElement parentElement, ParserProblem parserProblem,
1430
			int style) {
1431
		ParsingMessageElement element = new ParsingMessageElement(this,
1432
				parentElement, parserProblem, style);
1377
    public ParsingMessageElement createParsingMessageElement(ICdmFormElement parentElement,
1378
            ParserProblem parserProblem, int style) {
1379
        ParsingMessageElement element = new ParsingMessageElement(this, parentElement, parserProblem, style);
1433 1380
		adapt(element);
1434 1381
		parentElement.addElement(element);
1435 1382
		return element;
1436 1383
	}
1437 1384

  
1438
	// SIMPLIFY
1385
    public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass, ConversationHolder conversation,
1386
            ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
1439 1387

  
1440
	/**
1441
	 * 
1442
	 */
1443
	public static enum DetailType {
1444
		AUTHORSHIP, 
1445
		CLASSIFICATION, 
1446
		COLLECTION, 
1447
		DERIVED_UNIT, 
1448
		DERIVED_UNIT_FACADE, 
1449
		DERIVED_UNIT_GENERAL, 
1450
		DESCRIPTION, 
1451
		DESCRIPTIONELEMENT, 
1452
		DETERMINATION, 
1453
		FEATURE_DISTRIBUTION, 
1454
		FIELD_OBSERVATION, 
1455
		GATHERING_EVENT, 
1456
		GRANTEDAUTHORITY,
1457
		GROUP, 
1458
		HYBRID, 
1459
		INSTITUTION, 
1460
		MEDIA, 
1461
		NAMED_AREA, 
1462
		NAMED_AREA_LEVEL, 
1463
		NAMERELATIONSHIP, 
1464
		NATURAL_LANGUAGE, 
1465
		NOMENCLATURALREFERENCE, 
1466
		NONVIRALNAME, 
1467
		PARSINGMESSAGE, 
1468
		PERSON, 
1469
		POLYTOMOUS_KEY, 
1470
		POLYTOMOUS_KEY_NODE, 
1471
		REFERENCEBASE, 
1472
		REFERENCED_ENTITY, 
1473
		SCIENTIFICNAME, 
1474
		TAXON_NODE, 
1475
		TAXON_RELATIONSHIP, 
1476
		TAXONBASE, 
1477
		TEAM, 
1478
		TEAMORPERSONBASE, 
1479
		TERM_VOCABULARY,
1480
		USE_RECORD,
1481
		USER
1482
	}
1388
        AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement,
1389
                selectionProvider, style);
1483 1390
	
1484
	public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass,
1485
			ConversationHolder conversation, ICdmFormElement parentElement,
1486
			ISelectionProvider selectionProvider, int style) {
1487
		
1488
		AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement, selectionProvider, style);
1489
			
1490 1391
		parentElement.addElement(section);
1491 1392
		adapt(section);
1492 1393
		return section;
......
1499 1400
	 * @param style
1500 1401
	 * @return
1501 1402
	 */
1502
	public AbstractCdmDetailElement createDefinedTermDetailElement(
1503
			Class definedTermClass, AbstractCdmDetailSection parentElement,
1504
			int style) {
1403
    public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass, AbstractCdmDetailSection parentElement, int style) {
1505 1404
		AbstractCdmDetailElement element = null;
1506 1405
		
1507 1406
		if (NamedArea.class.isAssignableFrom(definedTermClass)){
1508 1407
			element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
1509
		}
1510
		else {
1408
        } else {
1511 1409
			element = new DefinedTermDetailElement(this, parentElement);
1512 1410
		}
1513 1411
		
......
1516 1414
		return element;
1517 1415
	}
1518 1416

  
1519
	/**
1520
	 * <p>
1521
	 * createCdmDetailSection
1522
	 * </p>
1523
	 * 
1524
	 * @param detailType
1525
	 *            a
1526
	 *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
1527
	 *            object.
1528
	 * @param parentElement
1529
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1530
	 *            object.
1531
	 * @param selectionProvider
1532
	 *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
1533
	 * @param style
1534
	 *            a int.
1535
	 * @param conversation
1536
	 *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
1537
	 *            object.
1538
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1539
	 *         object.
1540
	 */
1541
	public AbstractFormSection createCdmDetailSection(DetailType detailType,
1542
			ConversationHolder conversation, ICdmFormElement parentElement,
1543
			ISelectionProvider selectionProvider, int style) {
1544
		AbstractFormSection section = null;
1545

  
1546
		switch (detailType) {
1547
		case SCIENTIFICNAME:
1548
			section = new NameDetailSection(this, conversation, parentElement,
1549
					selectionProvider, style);
1550
			break;
1551
		case REFERENCEBASE:
1552
			section = new ReferenceDetailSection(this, conversation,
1553
					parentElement, selectionProvider, style);
1554
			break;
1555
		case NOMENCLATURALREFERENCE:
1556
			section = new NomenclaturalReferenceDetailSection(this,
1557
					conversation, parentElement, selectionProvider, style);
1558
			break;
1559
		case TAXONBASE:
1560
			section = new TaxonBaseDetailSection(this, conversation,
1561
					parentElement, selectionProvider, style);
1562
			break;
1563
		case AUTHORSHIP:
1564
			section = new AuthorshipDetailSection(this, conversation,
1565
					parentElement, selectionProvider, style);
1566
			break;
1567
		case TEAMORPERSONBASE:
1568
			section = new TeamOrPersonBaseDetailSection(this, conversation,
1569
					parentElement, selectionProvider, style);
1570
			break;
1571
		case TEAM:
1572
			section = new TeamDetailSection(this, conversation, parentElement,
1573
					null, style);
1574
			break;
1575
		case PERSON:
1576
			section = new PersonDetailSection(this, conversation,
1577
					parentElement, null, style);
1578
			break;
1579
		case DESCRIPTION:
1580
			section = new DescriptionDetailSection(this, conversation,
1581
					parentElement, selectionProvider, style);
1582
			break;
1583
		case DESCRIPTIONELEMENT:
1584
			section = new DescriptionElementDetailSection(this, conversation,
1585
					parentElement, selectionProvider, style);
1586
			break;
1587
		case PARSINGMESSAGE:
1588
			section = new ParsingMessagesSection(this, conversation,
1589
					parentElement, selectionProvider, style);
1590
			break;
1591
		case NONVIRALNAME:
1592
			section = new NonViralNameDetailSection(this, conversation,
1593
					parentElement, selectionProvider, style);
1594
			break;
1595
		case MEDIA:
1596
			section = new eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection(
1597
					this, conversation, parentElement, selectionProvider, style);
1598
			break;
1599
		case DERIVED_UNIT_FACADE:
1600
			section = new DerivedUnitFacadeDetailSection(this, conversation,
1601
					parentElement, selectionProvider, style);
1602
			break;
1603
		case FIELD_OBSERVATION:
1604
			section = new FieldObservationDetailSection(this, conversation,
1605
					parentElement, selectionProvider, style);
1606
			break;
1607
		case GATHERING_EVENT:
1608
			section = new GatheringEventDetailSection(this, conversation,
1609
					parentElement, selectionProvider, style);
1610
			break;
1611
		case DERIVED_UNIT:
1612
			section = new DerivedUnitBaseDetailSection(this, conversation,
1613
					parentElement, selectionProvider, style);
1614
			break;
1615
		case NATURAL_LANGUAGE:
1616
			section = new NaturalLanguageSection(this, conversation,
1617
					parentElement, selectionProvider, style);
1618
			break;
1619
		case FEATURE_DISTRIBUTION:
1620
			section = new FeatureDistributionDetailSection(this, conversation,
1621
					parentElement, selectionProvider, style);
1622
			break;
1623
		case CLASSIFICATION:
1624
			section = new ClassificationDetailSection(this, conversation,
1625
					parentElement, selectionProvider, style);
1626
			break;
1627
		case TAXON_NODE:
1628
			section = new TaxonNodeDetailSection(this, conversation,
1629
					parentElement, selectionProvider, style);
1630
			break;
1631
		case POLYTOMOUS_KEY:
1632
			section = new PolytomousKeyDetailSection(this, conversation,
1633
					parentElement, selectionProvider, style);
1634
			break;
1635
		case POLYTOMOUS_KEY_NODE:
1636
			section = new PolytomousKeyNodeDetailSection(this, conversation,
1637
					parentElement, selectionProvider, style);
1638
			break;
1639
		case INSTITUTION:
1640
			section = new InstitutionDetailSection(this, conversation,
1641
					parentElement, selectionProvider, style);
1642
			break;
1643
		case DERIVED_UNIT_GENERAL:
1644
			section = new GeneralDetailSection(this, conversation,
1645
					parentElement, selectionProvider, style);
1646
			break;
1647
		case HYBRID:
1648
			section = new HybridDetailSection(this, conversation,
1649
					parentElement, selectionProvider, style);
1650
			break;
1651
		case USER:
1652
			section = new UserDetailSection(this, conversation, parentElement,
1653
					selectionProvider, style);
1654
			break;
1655
		case GROUP:
1656
			section = new GroupDetailSection(this, conversation, parentElement,
1657
					selectionProvider, style);
1658
			break;
1659
		case DETERMINATION:
1660
			section = new DeterminationDetailSection(this, conversation, parentElement,
1661
					selectionProvider, style);
1662
			break;
1663
		case TAXON_RELATIONSHIP:
1664
			section = new TaxonRelationshipDetailSection(this, conversation, parentElement, 
1665
					selectionProvider, style);
1666
			break;
1667
		case REFERENCED_ENTITY:
1668
			section = new ReferencedEntityDetailSection(this, conversation, parentElement, 
1669
					selectionProvider, style);
1670
			break;
1671
		case TERM_VOCABULARY:
1672
			section = new TermVocabularyDetailSection(this, conversation, parentElement, 
1673
					selectionProvider, style);
1674
			break;
1675
		case NAMED_AREA:
1676
			section = new NamedAreaDetailSection(this, conversation, parentElement, 
1677
					selectionProvider, style);
1678
			break;
1679
		case USE_RECORD:
1680
			section = new UseRecordDetailSection(this, conversation, parentElement,
1681
					selectionProvider, style);
1682
			break;
1417

  
1418
    //--------DetailSections---------
1419
    public NameDetailSection createNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1420
        NameDetailSection section = new NameDetailSection(this, conversation, parentElement, selectionProvider, style);
1421
        addAndAdaptSection(parentElement, section);
1422
        return section;
1423
    }
1424

  
1425
    public ReferenceDetailSection createReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1426
        ReferenceDetailSection section = new ReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
1427
        addAndAdaptSection(parentElement, section);
1428
        return section;
1429
    }
1430

  
1431
    public NomenclaturalReferenceDetailSection createNomenclaturalReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1432
        NomenclaturalReferenceDetailSection section = new NomenclaturalReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
1433
        addAndAdaptSection(parentElement, section);
1434
        return section;
1435
    }
1436

  
1437
    public TaxonBaseDetailSection createTaxonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1438
        TaxonBaseDetailSection section = new TaxonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
1439
        addAndAdaptSection(parentElement, section);
1440
        return section;
1441
    }
1442

  
1443
    public AuthorshipDetailSection createAuthorshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1444
        AuthorshipDetailSection section = new AuthorshipDetailSection(this, conversation, parentElement, selectionProvider, style);
1445
        addAndAdaptSection(parentElement, section);
1446
        return section;
1447
    }
1448

  
1449
    public TeamOrPersonBaseDetailSection createTeamOrPersonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1450
        TeamOrPersonBaseDetailSection section = new TeamOrPersonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
1451
        addAndAdaptSection(parentElement, section);
1452
        return section;
1453
    }
1454

  
1455
    public TeamDetailSection createTeamDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
1456
        TeamDetailSection section = new TeamDetailSection(this, conversation, parentElement, null, style);
1457
        addAndAdaptSection(parentElement, section);
1458
        return section;
1459
    }
1460

  
1461
    public PersonDetailSection createPersonDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
1462
        PersonDetailSection section = new PersonDetailSection(this, conversation, parentElement, null, style);
1463
        addAndAdaptSection(parentElement, section);
1464
        return section;
1465
    }
1466

  
1467
    public DescriptionDetailSection createDescriptionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1468
        DescriptionDetailSection section = new DescriptionDetailSection(this, conversation, parentElement, selectionProvider, style);
1469
        addAndAdaptSection(parentElement, section);
1470
        return section;
1471
    }
1472

  
1473
    public DescriptionElementDetailSection createDescriptionElementDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1474
        DescriptionElementDetailSection section = new DescriptionElementDetailSection(this, conversation, parentElement, selectionProvider, style);
1475
        addAndAdaptSection(parentElement, section);
1476
        return section;
1477
    }
1478

  
1479
    public ParsingMessagesSection createParsingMessagesSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1480
        ParsingMessagesSection section = new ParsingMessagesSection(this, conversation, parentElement, selectionProvider, style);
1481
        addAndAdaptSection(parentElement, section);
1482
        return section;
1483
    }
1484

  
1485
    public NonViralNameDetailSection createNonViralNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1486
        NonViralNameDetailSection section = new NonViralNameDetailSection(this, conversation, parentElement, selectionProvider, style);
1487
        addAndAdaptSection(parentElement, section);
1488
        return section;
1489
    }
1490

  
1491
    public MediaDetailsSection createMediaDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1492
        MediaDetailsSection section = new MediaDetailsSection(this, conversation, parentElement, selectionProvider, style);
1493
        addAndAdaptSection(parentElement, section);
1494
        return section;
1495
    }
1496

  
1497
    public DerivedUnitFacadeDetailSection createDerivedUnitFacadeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1498
        DerivedUnitFacadeDetailSection section = new DerivedUnitFacadeDetailSection(this, conversation, parentElement, selectionProvider, style);
1499
        addAndAdaptSection(parentElement, section);
1500
        return section;
1501
    }
1502

  
1503
    public FieldObservationDetailSection createFieldObservationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1504
        FieldObservationDetailSection section = new FieldObservationDetailSection(this, conversation, parentElement, selectionProvider, style);
1505
        addAndAdaptSection(parentElement, section);
1506
        return section;
1507
    }
1508

  
1509
    public GatheringEventDetailSection createGatheringEventDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1510
        GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
1511
        addAndAdaptSection(parentElement, section);
1512
        return section;
1513
    }
1514

  
1515
    public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1516
        DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
1517
        addAndAdaptSection(parentElement, section);
1518
        return section;
1519
    }
1520

  
1521
    public NaturalLanguageSection createNaturalLanguageSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1522
        NaturalLanguageSection section = new NaturalLanguageSection(this, conversation, parentElement, selectionProvider, style);
1523
        addAndAdaptSection(parentElement, section);
1524
        return section;
1525
    }
1526

  
1527
    public FeatureDistributionDetailSection createFeatureDistributionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1528
        FeatureDistributionDetailSection section = new FeatureDistributionDetailSection(this, conversation, parentElement, selectionProvider, style);
1529
        addAndAdaptSection(parentElement, section);
1530
        return section;
1531
    }
1532

  
1533
    public ClassificationDetailSection createClassificationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1534
        ClassificationDetailSection section = new ClassificationDetailSection(this, conversation, parentElement, selectionProvider, style);
1535
        addAndAdaptSection(parentElement, section);
1536
        return section;
1537
    }
1538

  
1539
    public TaxonNodeDetailSection createTaxonNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1540
        TaxonNodeDetailSection section = new TaxonNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
1541
        addAndAdaptSection(parentElement, section);
1542
        return section;
1543
    }
1544

  
1545
    public PolytomousKeyDetailSection createPolytomousKeyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1546
        PolytomousKeyDetailSection section = new PolytomousKeyDetailSection(this, conversation, parentElement, selectionProvider, style);
1547
        addAndAdaptSection(parentElement, section);
1548
        return section;
1549
    }
1550

  
1551
    public PolytomousKeyNodeDetailSection createPolytomousKeyNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1552
        PolytomousKeyNodeDetailSection section = new PolytomousKeyNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
1553
        addAndAdaptSection(parentElement, section);
1554
        return section;
1555
    }
1556

  
1557
    public InstitutionDetailSection createInstitutionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1558
        InstitutionDetailSection section = new InstitutionDetailSection(this, conversation, parentElement, selectionProvider, style);
1559
        addAndAdaptSection(parentElement, section);
1560
        return section;
1561
    }
1562

  
1563
    public GeneralDetailSection createGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1564
        GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
1565
        addAndAdaptSection(parentElement, section);
1566
        return section;
1567
    }
1568

  
1569
    public HybridDetailSection createHybridDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1570
        HybridDetailSection section = new HybridDetailSection(this, conversation, parentElement, selectionProvider, style);
1571
        addAndAdaptSection(parentElement, section);
1572
        return section;
1573
    }
1574

  
1575
    public UserDetailSection createUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1576
        UserDetailSection section = new UserDetailSection(this, conversation, parentElement, selectionProvider, style);
1577
        addAndAdaptSection(parentElement, section);
1578
        return section;
1579
    }
1580

  
1581
    public GroupDetailSection createGroupDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1582
        GroupDetailSection section = new GroupDetailSection(this, conversation, parentElement, selectionProvider, style);
1583
        addAndAdaptSection(parentElement, section);
1584
        return section;
1585
    }
1586

  
1587
    public DeterminationDetailSection createDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1588
        DeterminationDetailSection section = new DeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
1589
        addAndAdaptSection(parentElement, section);
1590
        return section;
1591
    }
1592

  
1593
    public TaxonRelationshipDetailSection createTaxonRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1594
        TaxonRelationshipDetailSection section = new TaxonRelationshipDetailSection(this, conversation, parentElement, selectionProvider, style);
1595
        addAndAdaptSection(parentElement, section);
1596
        return section;
1597
    }
1598

  
1599
    public ReferencedEntityDetailSection createReferencedEntityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1600
        ReferencedEntityDetailSection section = new ReferencedEntityDetailSection(this, conversation, parentElement, selectionProvider, style);
1601
        addAndAdaptSection(parentElement, section);
1602
        return section;
1603
    }
1604

  
1605
    public TermVocabularyDetailSection createTermVocabularyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1606
        TermVocabularyDetailSection section = new TermVocabularyDetailSection(this, conversation, parentElement, selectionProvider, style);
1607
        addAndAdaptSection(parentElement, section);
1608
        return section;
1609
    }
1610

  
1611

  
1612
    public NamedAreaDetailSection createNamedAreaDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1613
        NamedAreaDetailSection section = new NamedAreaDetailSection(this, conversation, parentElement, selectionProvider, style);
1614
        addAndAdaptSection(parentElement, section);
1615
        return section;
1616
    }
1617

  
1618
    public UseRecordDetailSection createUseRecordDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1619
        UseRecordDetailSection section = new UseRecordDetailSection(this, conversation, parentElement, selectionProvider, style);
1620
        addAndAdaptSection(parentElement, section);
1621
        return section;
1622
    }
1623

  
1624
    public GeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1625
        GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
1626
        addAndAdaptSection(parentElement, section);
1627
        return section;
1683 1628
		}
1684 1629
		
1685

  
1686
		if (section == null) {
1687
			throw new RuntimeException(
1688
					"You tried to create a cdm detail section that is not implemented yet.");
1630
    public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1631
        GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
1632
        addAndAdaptSection(parentElement, section);
1633
        return section;
1634
    }
1635

  
1636
    public FieldObservationDetailSection createFODetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
1637
        FieldObservationDetailSection section = new FieldObservationDetailSection(this, conversation, parentElement, selectionProvider, style);
1638
        addAndAdaptSection(parentElement, section);
1639
        return section;
1689 1640
		}
1690 1641

  
1642
    private void addAndAdaptSection(ICdmFormElement parentElement, AbstractFormSection<?> section) {
1691 1643
		parentElement.addElement(section);
1692 1644
		adapt(section);
1693
		return section;
1694 1645
	}
1695 1646

  
1647
    //--------DetailElements------------
1648

  
1649
    public UseRecordDetailElement createUseRecordDetailElement(ICdmFormElement parentElement){
1650
        UseRecordDetailElement element = new UseRecordDetailElement(this, parentElement);
1651
        addAndAdaptElement(parentElement, element);
1652
        return element;
1653
    }
1654

  
1655
    public DefinedTermDetailElement<NamedAreaLevel> createNamedAreaLevelElement(ICdmFormElement parentElement){
1656
        DefinedTermDetailElement<NamedAreaLevel> element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
1657
        addAndAdaptElement(parentElement, element);
1658
        return element;
1659
    }
1660

  
1661
    public eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement createNamedAreaDetailElement(ICdmFormElement parentElement){
1662
        eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
1663
        addAndAdaptElement(parentElement, element);
1664
        return element;
1665
    }
1666

  
1667
    public TermVocabularyDetailElement createTermVocabularyDetailElement(ICdmFormElement parentElement){
1668
        TermVocabularyDetailElement element = new TermVocabularyDetailElement(this, parentElement);
1669
        addAndAdaptElement(parentElement, element);
1670
        return element;
1671
    }
1672

  
1673
    public ReferenceEntityDetailElement createReferenceEntityDetailElement(ICdmFormElement parentElement){
1674
        ReferenceEntityDetailElement element = new ReferenceEntityDetailElement(this, parentElement);
1675
        addAndAdaptElement(parentElement, element);
1676
        return element;
1677
    }
1678

  
1679
    public TaxonRelationshipDetailElement createTaxonRelationshipDetailElement(ICdmFormElement parentElement){
1680
        TaxonRelationshipDetailElement element = new TaxonRelationshipDetailElement(this, parentElement);
1681
        addAndAdaptElement(parentElement, element);
1682
        return element;
1683
    }
1684

  
1685
    public GrantedAuthorityDetailElement createGrantedAuthorityDetailElement(ICdmFormElement parentElement){
1686
        GrantedAuthorityDetailElement element = new GrantedAuthorityDetailElement(this, parentElement);
1687
        addAndAdaptElement(parentElement, element);
1688
        return element;
1689
    }
1690

  
1691
    public GroupDetailElement createGroupDetailElement(ICdmFormElement parentElement){
1692
        GroupDetailElement element = new GroupDetailElement(this, parentElement);
1693
        addAndAdaptElement(parentElement, element);
1694
        return element;
1695
    }
1696

  
1697
    public UserDetailElement createUserDetailElement(ICdmFormElement parentElement){
1698
        UserDetailElement element = new UserDetailElement(this, parentElement);
1699
        addAndAdaptElement(parentElement, element);
1700
        return element;
1701
    }
1702

  
1703
    public HybridDetailElement createHybridDetailElement(ICdmFormElement parentElement){
1704
        HybridDetailElement element = new HybridDetailElement(this, parentElement);
1705
        addAndAdaptElement(parentElement, element);
1706
        return element;
1707
    }
1708

  
1709
    public InstitutionDetailElement createInstitutionDetailElement(ICdmFormElement parentElement){
1710
        InstitutionDetailElement element = new InstitutionDetailElement(this, parentElement);
1711
        addAndAdaptElement(parentElement, element);
1712
        return element;
1713
    }
1714

  
1715
    public PolytomousKeyNodeDetailElement createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement){
1716
        PolytomousKeyNodeDetailElement element = new PolytomousKeyNodeDetailElement(this, parentElement);
1717
        addAndAdaptElement(parentElement, element);
1718
        return element;
1719
    }
1720

  
1721
    public PolytomousKeyDetailElement createPolytomousKeyDetailElement(ICdmFormElement parentElement){
1722
        PolytomousKeyDetailElement element = new PolytomousKeyDetailElement(this, parentElement);
1723
        addAndAdaptElement(parentElement, element);
1724
        return element;
1725
    }
1726

  
1727
    public CollectionDetailElement createCollectionDetailElement(ICdmFormElement parentElement){
1728
        CollectionDetailElement element = new CollectionDetailElement(this, parentElement);
1729
        addAndAdaptElement(parentElement, element);
1730
        return element;
1731
    }
1732

  
1733
    public TaxonNodeDetailElement createTaxonNodeDetailElement(ICdmFormElement parentElement){
1734
        TaxonNodeDetailElement element = new TaxonNodeDetailElement(this, parentElement);
1735
        addAndAdaptElement(parentElement, element);
1736
        return element;
1737
    }
1738

  
1739
    public ClassificationDetailElement createClassificationDetailElement(ICdmFormElement parentElement){
1740
        ClassificationDetailElement element = new ClassificationDetailElement(this, parentElement);
1741
        addAndAdaptElement(parentElement, element);
1742
        return element;
1743
    }
1744

  
1745
    public FeatureDistributionDetailElement createFeatureDistributionDetailElement(ICdmFormElement parentElement){
1746
        FeatureDistributionDetailElement element = new FeatureDistributionDetailElement(this, parentElement);
1747
        addAndAdaptElement(parentElement, element);
1748
        return element;
1749
    }
1750

  
1751
    public NaturalLanguageDetailElement createNaturalLanguageDetailElement(ICdmFormElement parentElement){
1752
        NaturalLanguageDetailElement element = new NaturalLanguageDetailElement(this, parentElement);
1753
        addAndAdaptElement(parentElement, element);
1754
        return element;
1755
    }
1756

  
1757
    public DerivedUnitFacadeDetailElement createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement){
1758
        DerivedUnitFacadeDetailElement element = new DerivedUnitFacadeDetailElement(this, parentElement);
1759
        addAndAdaptElement(parentElement, element);
1760
        return element;
1761
    }
1762

  
1763
    public NonViralNameDetailElement createNonViralNameDetailElement(ICdmFormElement parentElement){
1764
        NonViralNameDetailElement element = new NonViralNameDetailElement(this, parentElement);
1765
        addAndAdaptElement(parentElement, element);
1766
        return element;
1767
    }
1768

  
1769
    public DescriptionElementDetailElement createDescriptionElementDetailElement(ICdmFormElement parentElement, int style){
1770
        DescriptionElementDetailElement element = new DescriptionElementDetailElement(this, parentElement, style);
1771
        addAndAdaptElement(parentElement, element);
1772
        return element;
1773
    }
1774

  
1775
    public DescriptionDetailElement createDescriptionDetailElement(ICdmFormElement parentElement, int style){
1776
        DescriptionDetailElement element = new DescriptionDetailElement(this, parentElement, style);
1777
        addAndAdaptElement(parentElement, element);
1778
        return element;
1779
    }
1780

  
1781
    public PersonDetailElement createPersonDetailElement(ICdmFormElement parentElement, int style){
1782
        PersonDetailElement element = new PersonDetailElement(this, parentElement, style);
1783
        addAndAdaptElement(parentElement, element);
1784
        return element;
1785
    }
1786

  
1787
    public TeamDetailElement createTeamDetailElement(ICdmFormElement parentElement, int style){
1788
        TeamDetailElement element = new TeamDetailElement(this, parentElement, style);
1789
        addAndAdaptElement(parentElement, element);
1790
        return element;
1791
    }
1792

  
1793
    public AuthorshipDetailElement createAuthorshipDetailElement(ICdmFormElement parentElement, int style){
1794
        AuthorshipDetailElement element = new AuthorshipDetailElement(this, parentElement, style);
1795
        addAndAdaptElement(parentElement, element);
1796
        return element;
1797
    }
1798

  
1799
    public TaxonBaseDetailElement createTaxonBaseDetailElement(ICdmFormElement parentElement, int style){
1800
        TaxonBaseDetailElement element = new TaxonBaseDetailElement(this, parentElement, style);
1801
        addAndAdaptElement(parentElement, element);
1802
        return element;
1803
    }
1804

  
1805
    public NameDetailElement createNameDetailElement(ICdmFormElement parentElement, int style){
1806
        NameDetailElement element = new NameDetailElement(this, parentElement, style);
1807
        addAndAdaptElement(parentElement, element);
1808
        return element;
1809
    }
1810

  
1811
    public ReferenceDetailElement createReferenceDetailElement(ICdmFormElement parentElement, int style){
1812
        ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, style);
1813
        addAndAdaptElement(parentElement, element);
1814
        return element;
1815
    }
1816

  
1817
    public NomenclaturalReferenceDetailElement createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement, int style){
1818
        NomenclaturalReferenceDetailElement element = new NomenclaturalReferenceDetailElement(this, parentElement, style);
1819
        addAndAdaptElement(parentElement, element);
1820
        return element;
1821
    }
1696 1822
	
1697 1823
	
1698
	/**
1699
	 * <p>
1700
	 * createCdmDetailElement
1701
	 * </p>
1702
	 * 
1703
	 * @param detailType
1704
	 *            a
1705
	 *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
1706
	 *            object.
1707
	 * @param style
1708
	 *            a int.
1709
	 * @param parentElement
1710
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1711
	 *            object.
1712
	 * @return a
1713
	 *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement}
1714
	 *         object.
1715
	 */
1716
	public AbstractCdmDetailElement createCdmDetailElement(
1717
			DetailType detailType, ICdmFormElement parentElement, int style) {
1718
		AbstractCdmDetailElement element = null;
1719

  
1720
		switch (detailType) {
1721
		case SCIENTIFICNAME:
1722
			element = new NameDetailElement(this, parentElement, style);
1723
			break;
1724
		case REFERENCEBASE:
1725
			element = new ReferenceDetailElement(this, parentElement, style);
1726
			break;
1727
		case NOMENCLATURALREFERENCE:
1728
			element = new NomenclaturalReferenceDetailElement(this,
1729
					parentElement, style);
1730
			break;
1731
		case TAXONBASE:
1732
			element = new TaxonBaseDetailElement(this, parentElement, style);
1733
			break;
1734
		case AUTHORSHIP:
1735
			element = new AuthorshipDetailElement(this, parentElement, style);
1736
			break;
1737
		case TEAM:
1738
			element = new TeamDetailElement(this, parentElement, style);
1739
			break;
1740
		case PERSON:
1741
			element = new PersonDetailElement(this, parentElement, style);
1742
			break;
1743
		case DESCRIPTION:
1744
			element = new DescriptionDetailElement(this, parentElement, style);
1745
			break;
1746
		case DESCRIPTIONELEMENT:
1747
			element = new DescriptionElementDetailElement(this, parentElement,
1748
					style);
1749
			break;
1750
		case NONVIRALNAME:
1751
			element = new NonViralNameDetailElement(this, parentElement);
1752
			break;
1753
		case DERIVED_UNIT_FACADE:
1754
			element = new DerivedUnitFacadeDetailElement(this, parentElement);
1755
			break;
1756
		case FIELD_OBSERVATION:
1757
			element = new FieldObservationDetailElement(this, parentElement);
1758
			break;
1759
		case GATHERING_EVENT:
1760
			element = new GatheringEventDetailElement(this, parentElement);
1761
			break;
1762
		case DERIVED_UNIT:
1763
			element = new DerivedUnitBaseDetailElement(this, parentElement);
1764
			break;
1765
		case NATURAL_LANGUAGE:
1766
			element = new NaturalLanguageDetailElement(this, parentElement);
1767
			break;
1768
		case FEATURE_DISTRIBUTION:
1769
			element = new FeatureDistributionDetailElement(this, parentElement);
1770
			break;
1771
		case CLASSIFICATION:
1772
			element = new ClassificationDetailElement(this, parentElement);
1773
			break;
1774
		case TAXON_NODE:
1775
			element = new TaxonNodeDetailElement(this, parentElement);
1776
			break;
1777
		case COLLECTION:
1778
			element = new CollectionDetailElement(this, parentElement);
1779
			break;
1780
		case POLYTOMOUS_KEY:
1781
			element = new PolytomousKeyDetailElement(this, parentElement);
1782
			break;
1783
		case POLYTOMOUS_KEY_NODE:
1784
			element = new PolytomousKeyNodeDetailElement(this, parentElement);
1785
			break;
1786
		case INSTITUTION:
1787
			element = new InstitutionDetailElement(this, parentElement);
1788
			break;
1789
		case DERIVED_UNIT_GENERAL:
1790
			element = new GeneralDetailElement(this, parentElement);
1791
			break;
1792
		case HYBRID:
1793
			element = new HybridDetailElement(this, parentElement);
1794
			break;
1795
		case USER:
1796
			element = new UserDetailElement(this, parentElement);
1797
			break;
1798
		case GROUP:
1799
			element = new GroupDetailElement(this, parentElement);
1800
			break;
1801
		case GRANTEDAUTHORITY:
1802
			element = new GrantedAuthorityDetailElement(this, parentElement);
1803
			break;
1804
		case DETERMINATION:
1805
			element = new DeterminationDetailElement(this, parentElement);
1806
			break;
1807
		case TAXON_RELATIONSHIP:
1808
			element = new TaxonRelationshipDetailElement(this, parentElement);
1809
			break;
1810
		case REFERENCED_ENTITY:
1811
			element = new RefereneEntityDetailElement(this, parentElement);
1812
			break;
1813
		case TERM_VOCABULARY:
1814
			element = new TermVocabularyDetailElement(this, parentElement);
1815
			break;
1816
		case NAMED_AREA:
1817
			element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
1818
			break;
1819
		case NAMED_AREA_LEVEL:
1820
			element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
1821
			break;
1822
		case USE_RECORD:
1823
			//element = new UseRecordDetailElement(this, parentElement, style);
1824
			element = new UseRecordDetailElement(this, parentElement);
1825
			break;
1824
    public GeneralDetailElement createGeneralDetailElement(ICdmFormElement parentElement){
1825
        GeneralDetailElement element = new GeneralDetailElement(this, parentElement);
1826
        addAndAdaptElement(parentElement, element);
1827
        return element;
1828
    }
1829

  
1830
    public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
1831
        GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
1832
        addAndAdaptElement(parentElement, element);
1833
        return element;
1826 1834
		}
1827 1835

  
1828
		if (element == null) {
1829
			StoreUtil
1830
					.error(this.getClass(),
1831
							"Detail element was not created. Seems like the case was not implemented for the requested detail type: "
1832
									+ detailType, null);
1836
    public FieldObservationDetailElement createFieldObservationDetailElement(ICdmFormElement parentElement) {
1837
        FieldObservationDetailElement element = new FieldObservationDetailElement(this, parentElement);
1838
        addAndAdaptElement(parentElement, element);
1839
        return element;
1833 1840
		}
1834 1841

  
1835
		adapt(element);
1836
		parentElement.addElement(element);
1842
    public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
1843
        DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
1844
        addAndAdaptElement(parentElement, element);
1837 1845
		return element;
1838 1846
	}
1839 1847

  
1840
	/**
1841
	 * 
1842
	 * @author n.hoffmann
1843
	 * @created Mar 5, 2010
1844
	 * @version 1.0
1845
	 */
1846
	public static enum EntityDetailType {
1847
		TEAM, 
1848
		TEAMMEMBER, 
1849
		ANNOTATION, 
1850
		CREDIT, 
1851
		DESCRIPTIONELEMENTSOURCE, 
1852
		EXTENSION, 
1853
		MARKER, 
1854
		MEDIA, 
1855
		DESCRIPTIONELEMENTMEDIA, 
1856
		MEDIAREPRESENTATION, 
1857
		MEDIAREPRESENTATIONPART, 
1858
		MODIFIER, 
1859
		NOMENCLATURALSTATUS, 
1860
		NAME_RELATIONSHIP, 
1861
		PROTOLOG, 
1862
		RIGHTS, 
1863
		SOURCE, 
1864
		SCOPE, 
1865
		DESCRIPTIONSOURCE, 
1866
		TYPEDESIGNATION, 
1867
		STATE_DATA, 
1868
		STATISTICAL_MEASUREMENT_VALUE, 
1869
		DESCRIBED_SPECIMEN, 
1870
		COLLECTING_AREA, 
1871
		DETERMINATION_EVENT, 
1872
		SPECIMEN_COLLECTION, 
1873
		IDENTIFIABLE_SOURCE_COLLECTION, 
1874
		GEOGRAPHICAL_SCOPE, 
1875
		SCOPE_RESTRICTION, 
1876
		MEMBER, 
1877
		GRANTED_AUTHORITY, 
1878
		GROUPS_BY_USER, 
1879
		TAXONOMIC_SCOPE, 
1880
		DETERMINATION_CURRENT, 
1881
		DETERMINATION_HISTORY
1848
    public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
1849
        DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
1850
        addAndAdaptElement(parentElement, element);
1851
        return element;
1882 1852
	}
1883 1853

  
1884 1854
	/**
1885
	 * <p>
1886
	 * createEntityDetailSection
1887
	 * </p>
1888
	 * 
1889
	 * @param entityDetailType
1890
	 *            a
1891
	 *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType}
1892
	 *            object.
1893
	 * @param style
1894
	 *            a int.
1895
	 * @param conversation
1896
	 *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
1897
	 *            object.
1898 1855
	 * @param parentElement
1899
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1900
	 *            object.
1901
	 * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1902
	 *         object.
1856
     * @param element
1903 1857
	 */
1904
	public AbstractFormSection createEntityDetailSection(
1905
			EntityDetailType entityDetailType, ConversationHolder conversation,
1906
			ICdmFormElement parentElement, int style) {
1907
		AbstractFormSection section = null;
1908

  
1909
		switch (entityDetailType) {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff