Project

General

Profile

« Previous | Next » 

Revision 8cbae4a4

Added by Katja Luther over 2 years ago

ref #9861: adapt tooltip text

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrix.java
311 311
    	        	}
312 312
    	        		
313 313
    	        	return "Multiple data exist. Editing only possible in factual data view of " + object;
314
    	        }
315
    	        if (cell.getConfigLabels().getLabels().contains(CharacterMatrixConfigLabelAccumulator.NOT_APPLICABLE)){
316
    	        	return "This character is not applicable because of the state of a parent feature." ;
314 317
    	        }
315 318
    			return null;
316 319
    		}
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixConfigLabelAccumulator.java
43 43
    public static final String CATEGORICAL_EDITABLE = CATEGORICAL+"_EDITABLE";
44 44
    public static final String QUANTITATIVE_EDITABLE = QUANTITATIVE+"_EDITABLE";
45 45
    public static final String NOT_EDITABLE = "NOT_EDITABLE";
46
    public static final String NOT_APPLICABLE = "NOT APPLICABLE";
46 47

  
47 48
    private CharacterMatrix matrix;
48 49

  
......
54 55
    @Override
55 56
    public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
56 57
        boolean isEditable = true;
58
        boolean isApplicable = true;
57 59

  
58 60
        Object rowObject = matrix.getBodyDataProvider().getRowObject(rowPosition);
59 61
        if(rowObject instanceof TaxonNodeDto){
......
130 132
	            	isEditable = false;
131 133
	            }
132 134
	            if (!isApplicableCheck(feature, (RowWrapperDTO)rowObject)){
133
	            	isEditable = false;
135
	            	isApplicable = false;
134 136
	            }
135 137
            }
136 138

  
137 139
            if(feature.isSupportsCategoricalData()){
138 140
            	
139 141
                configLabels.addLabel(CATEGORICAL);
140
                if(isEditable){
142
                if(isEditable && isApplicable){
141 143
                    configLabels.addLabel(CATEGORICAL_EDITABLE);
142
                }else{
144
                }else if (!isEditable && isApplicable){
143 145
                	configLabels.addLabel(NOT_EDITABLE);
144 146
                }
147
                
145 148
            }
146 149
            else if(feature.isSupportsQuantitativeData()){
147 150
                configLabels.addLabel(QUANTITATIVE);
148
                if(isEditable){
151
                if(isEditable && isApplicable){
149 152
                    configLabels.addLabel(QUANTITATIVE_EDITABLE);
150
                }else{
153
                }else if (!isEditable && isApplicable){
151 154
                	configLabels.addLabel(NOT_EDITABLE);
152 155
                }
153 156
            }
157
            if (!isApplicable){
158
            	configLabels.addLabel(NOT_APPLICABLE);
159
            	
160
            }
154 161
        }
155 162
    }
156 163

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixLabelStyleConfiguration.java
79 79
                notEditableValueStyle,
80 80
                DisplayMode.NORMAL,
81 81
                CharacterMatrixConfigLabelAccumulator.NOT_EDITABLE);
82
        
83
        Style notApplicableValueStyle = new Style();
84
        notApplicableValueStyle.setAttributeValue(
85
                CellStyleAttributes.BACKGROUND_COLOR,
86
                GUIHelper.COLOR_GRAY);
87
        configRegistry.registerConfigAttribute(
88
                CellConfigAttributes.CELL_STYLE,
89
                notApplicableValueStyle,
90
                DisplayMode.NORMAL,
91
                CharacterMatrixConfigLabelAccumulator.NOT_APPLICABLE);
82 92

  
83 93
        Style defaultOverriddenStyle = new Style();
84 94
        defaultOverriddenStyle.setAttributeValue(

Also available in: Unified diff