Project

General

Profile

Revision 66b0c98f

ID66b0c98f15c514608fda3395ad1bb12e7a3cfd00
Parent 97278383
Child 5c228c71

Added by Patrick Plitzner about 5 years ago

Import specimen scans with StillImage type

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
68 68
                                new MenuItem(addMenu, SWT.SEPARATOR);
69 69
                                createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
70 70
                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
71
                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
71
                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
72 72
                                return;
73 73
                            }
74 74
                            //context menu for Specimen
......
76 76

  
77 77
                                createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
78 78
                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
79
                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
79
                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
80 80
                                return;
81 81
                            }
82 82
                            //context menu for TissueSample
83 83
                            else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.TissueSample){
84 84
                            	createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
85
                            	createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
85
                            	createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
86 86
                                return;
87 87
                            }
88 88
                            //context menu for DnaSample
89 89
                            else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.DnaSample){
90 90
                                createMenuItem(addMenu, CONSENSUS_SEQUENCE, selectedTreeNode, Sequence.class, null, null);
91
                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
91
                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
92 92
                                return;
93 93
                            }
94 94
                            //context menu for Sequence
......
109 109
    }
110 110

  
111 111
    private void createMenuItem(Menu menu, String menuLabel, final TreeNode selectedNode, Class<?> childClass, final SpecimenOrObservationType specimenType, final DerivationEventType derivationEventType) {
112
        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.Media)){
112
        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.StillImage)){
113 113
            //media submenu
114 114
            MenuItem mediaItem = new MenuItem(menu, SWT.CASCADE);
115 115
            mediaItem.setText(Messages.CreateDerivateContextMenu_MEDIA);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)