Revision 20571

View differences:

trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/histogram/HistogramProcess.java
33 33
 * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
34 34
 */
35 35
public class HistogramProcess extends RasterProcess {
36
	IHistogramable iHistogramable = null;
36
	private IHistogramable iHistogramable = null;
37
	private Histogram      lastHistogram  = null;
37 38

  
38 39
	/*
39 40
	 * (non-Javadoc)
......
50 51
	public void process() throws InterruptedException {
51 52
		try {
52 53
			// Proceso duro de obtener un histograma. Puede durar bastante tiempo.
53
			Histogram histogram = iHistogramable.getHistogram();
54
			lastHistogram = iHistogramable.getHistogram();
54 55
			// Ya tenemos el histograma y lo representamos en la ventana
55
			if (histogram != null)
56
				externalActions.end(histogram);
56
			if ((externalActions != null) && (lastHistogram != null))
57
				externalActions.end(lastHistogram);
57 58
		} catch (HistogramException e) {
58 59
			NotificationManager.addError("Error calculando el histograma.", e);
59 60
		}
60 61
	}
62
	
63
	/*
64
	 * (non-Javadoc)
65
	 * @see org.gvsig.raster.RasterProcess#getResult()
66
	 */
67
	public Object getResult() {
68
		return lastHistogram;
69
	}
61 70

  
62 71
	/*
63 72
	 * (non-Javadoc)

Also available in: Unified diff