Project

General

Profile

« Previous | Next » 

Revision 809f6237

Added by Katja Luther over 5 years ago

ref #7345: every reference used for a common name gets a marker 'common name reference'

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
149 149
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
150 150
import eu.etaxonomy.taxeditor.ui.section.common.ReferenceEntityDetailElement;
151 151
import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
152
import eu.etaxonomy.taxeditor.ui.section.description.CommonNameSourceElement;
152 153
import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
153 154
import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
154 155
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailElement;
......
351 352
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionSection;
352 353
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
353 354
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
355
import eu.etaxonomy.taxeditor.ui.selection.CommonNameReferenceSelectionElement;
354 356
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
355 357
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElementWithAbbreviatedTitle;
356 358
import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
......
804 806
        parentElement.addElement(element);
805 807
        return element;
806 808
    }
809
    public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
810
            URI initialUri,Integer textHeight, int style) {
811
        UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, textHeight, style);
812
        adapt(element);
813
        parentElement.addElement(element);
814
        return element;
815
    }
816

  
807 817

  
808 818
    /**
809 819
     * @param element
......
1227 1237
            String initialText, boolean initialState, int style) {
1228 1238
        ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText,
1229 1239
                initialState, style | orientation);
1240

  
1230 1241
        adapt(element);
1231 1242
        parentElement.addElement(element);
1232 1243
        return element;
......
2715 2726
                    style);
2716 2727
        } else if (entity instanceof Rights) {
2717 2728
            element = new RightsElement(this, parentElement, (Rights) entity, removeListener, style);
2729
        } else if (entity instanceof DescriptionElementSource && parentElement.getEntity() instanceof CommonTaxonName) {
2730
            element = new CommonNameSourceElement(this, parentElement, (DescriptionElementSource) entity,
2731
                    removeListener, style);
2718 2732
        } else if (entity instanceof DescriptionElementSource) {
2719 2733
            element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
2720
                    removeListener, style);
2734
                    removeListener, style, false);
2721 2735
        } else if (entity instanceof TaxonNodeAgentRelation) {
2722 2736
            element = new TaxonNodeAgentRelationCollectionElement(this, parentElement, (TaxonNodeAgentRelation) entity,
2723 2737
                    removeListener,backgroundColor, style);
......
2928 2942
//            ConversationHolder conversation,
2929 2943
            ICdmFormElement parentElement, String labelString, T selection, int mode,
2930 2944
            int style) {
2931
        EntitySelectionElement<T> element = new EntitySelectionElement<T>(this, //conversation,
2945
        EntitySelectionElement<T> element = new EntitySelectionElement<T>(this,
2932 2946
                parentElement, clazz,
2933 2947
                labelString, selection, mode, style);
2934 2948
        adapt(element);
......
2936 2950
        return element;
2937 2951
    }
2938 2952

  
2953
    public CommonNameReferenceSelectionElement createCommonNameReferenceSelectionElement(ICdmFormElement parentElement, String labelString, Reference selection, int mode,
2954
          int style) {
2955
        CommonNameReferenceSelectionElement element = new CommonNameReferenceSelectionElement(this,
2956
              parentElement, labelString, selection, mode, style);
2957
      adapt(element);
2958
      parentElement.addElement(element);
2959
      return element;
2960
  }
2961

  
2939 2962
    /**
2940 2963
     * <p>
2941 2964
     * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
......
3009 3032
        return labelElement;
3010 3033
    }
3011 3034

  
3035

  
3036

  
3012 3037
//    public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3013 3038
//        Label label = new Label(formElement.getLayoutComposite(), style);
3014 3039
//        label.setText(labelText+" (yyyy-MM-dd)");
......
3151 3176

  
3152 3177

  
3153 3178

  
3179

  
3180

  
3154 3181
//	public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3155 3182
//		 RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3156 3183
//				 initialText, textHeight, style);

Also available in: Unified diff