Revision 19357 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/enhanced/graphics/HistogramGraphicBase.java
HistogramGraphicBase.java | ||
---|---|---|
140 | 140 |
* @param colorInterp |
141 | 141 |
*/ |
142 | 142 |
public void setHistogramDrawed(int colorInterp) { |
143 |
Color color = Color.white; |
|
143 | 144 |
switch (colorInterp) { |
144 |
case RED: histogramDrawed = histogramRed; break; |
|
145 |
case GREEN: histogramDrawed = histogramGreen; break; |
|
146 |
case BLUE: histogramDrawed = histogramBlue; break; |
|
147 |
case GRAY: histogramDrawed = histogramGray; break; |
|
145 |
case RED: |
|
146 |
histogramDrawed = histogramRed; |
|
147 |
color = Color.red; |
|
148 |
break; |
|
149 |
case GREEN: |
|
150 |
histogramDrawed = histogramGreen; |
|
151 |
color = Color.green; |
|
152 |
break; |
|
153 |
case BLUE: |
|
154 |
histogramDrawed = histogramBlue; |
|
155 |
color = Color.blue; |
|
156 |
break; |
|
157 |
case GRAY: |
|
158 |
histogramDrawed = histogramGray; |
|
159 |
color = Color.gray; |
|
160 |
break; |
|
148 | 161 |
} |
149 |
if(gHist != null) |
|
150 |
gHist.setHistogramDrawed(histogramDrawed); |
|
151 |
if(canvas != null) |
|
152 |
canvas.repaint(); |
|
162 |
|
|
163 |
if (gHist == null) |
|
164 |
return; |
|
165 |
|
|
166 |
gHist.setColor(color); |
|
167 |
gHist.setHistogramDrawed(histogramDrawed); |
|
153 | 168 |
} |
154 | 169 |
|
155 | 170 |
/** |
Also available in: Unified diff