Add type specimen icon to derivate editor
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 7 Dec 2015 14:25:31 +0000 (15:25 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 7 Dec 2015 14:25:31 +0000 (15:25 +0100)
eu.etaxonomy.taxeditor.store/icons/specimen_derivate_type-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java

diff --git a/eu.etaxonomy.taxeditor.store/icons/specimen_derivate_type-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/specimen_derivate_type-16x16-32.png
new file mode 100644 (file)
index 0000000..8e0393c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/specimen_derivate_type-16x16-32.png differ
index e44c056..8aab0e7 100644 (file)
@@ -146,6 +146,7 @@ public class ImageResources {
        public static final String FIELD_UNIT = "field_unit";
        public static final String FIELD_UNIT_CHARACTER_DATA = "field_unit_character_data";
        public static final String SPECIMEN_DERIVATE = "specimen_derivate";
+       public static final String SPECIMEN_DERIVATE_TYPE = "specimen_derivate_type";
        public static final String SPECIMEN_DERIVATE_CHARACTER_DATA = "specimen_derivate_character_data";
     public static final String ARTWORK_DERIVATE = "artwork_derivate";
     public static final String ARTWORK_DERIVATE_CHARACTER_DATA = "artwork_derivate_character_data";
@@ -353,6 +354,8 @@ public class ImageResources {
                        "fieldunit_data-16x16-32.png");
                registerImage(registry, SPECIMEN_DERIVATE,
                        "specimen_derivate-16x16-32.png");
+               registerImage(registry, SPECIMEN_DERIVATE_TYPE,
+                       "specimen_derivate_type-16x16-32.png");
                registerImage(registry, SPECIMEN_DERIVATE_CHARACTER_DATA,
                        "specimen_derivate_data-16x16-32.png");
                registerImage(registry, ARTWORK_DERIVATE,
index 3579eff..36c5e92 100644 (file)
@@ -352,11 +352,6 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             else if(cdmBase.isInstanceOf(DerivedUnit.class)){
                 DerivedUnit derivedUnit = HibernateProxyHelper.deproxy(element, DerivedUnit.class);
 
-                boolean isType = false;
-                //type designation extension
-                if(typeDesignations.get(derivedUnit)!=null && !typeDesignations.get(derivedUnit).isEmpty()){
-                    isType = true;
-                }
                 if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.FieldUnit){
                     return hasCharacterData?ImageResources.getImage(ImageResources.FIELD_UNIT_CHARACTER_DATA):ImageResources.getImage(ImageResources.FIELD_UNIT);
                 }
@@ -367,6 +362,9 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                     return hasCharacterData?ImageResources.getImage(ImageResources.TISSUE_SAMPLE_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.TISSUE_SAMPLE_DERIVATE);
                 }
                 else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
+                    if(typeDesignations.get(derivedUnit)!=null && !typeDesignations.get(derivedUnit).isEmpty()){
+                        return ImageResources.getImage(ImageResources.SPECIMEN_DERIVATE_TYPE);
+                    }
                     return hasCharacterData?ImageResources.getImage(ImageResources.SPECIMEN_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.SPECIMEN_DERIVATE);
                 }
                 else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.Media){