root / trunk / extensions / extRasterTools-SE / src / org / gvsig / rastertools / histogram / HistogramProcess.java @ 10950
History | View | Annotate | Download (1.26 KB)
1 |
package org.gvsig.rastertools.histogram; |
---|---|
2 |
|
3 |
import org.gvsig.gui.beans.incrementabletask.IIncrementable; |
4 |
import org.gvsig.raster.util.HistogramException; |
5 |
import org.gvsig.raster.util.IHistogramable; |
6 |
|
7 |
public class HistogramProcess extends Thread implements IIncrementable { |
8 |
IHistogramable iHistogramable = null;
|
9 |
|
10 |
public HistogramProcess(IHistogramable iHistogramable) {
|
11 |
this.iHistogramable = iHistogramable;
|
12 |
this.start();
|
13 |
} |
14 |
|
15 |
public void run() { |
16 |
try {
|
17 |
iHistogramable.getHistogram(); |
18 |
} catch (HistogramException e) {
|
19 |
// TODO Auto-generated catch block
|
20 |
e.printStackTrace(); |
21 |
} |
22 |
} |
23 |
/*
|
24 |
* (non-Javadoc)
|
25 |
* @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getLabel()
|
26 |
*/
|
27 |
public String getLabel() { |
28 |
return "Generando histograma, por favor, espere..."; |
29 |
} |
30 |
|
31 |
/*
|
32 |
* (non-Javadoc)
|
33 |
* @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getLog()
|
34 |
*/
|
35 |
public String getLog() { |
36 |
return "Calculando histograma..."; |
37 |
} |
38 |
|
39 |
/*
|
40 |
* (non-Javadoc)
|
41 |
* @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getPercent()
|
42 |
*/
|
43 |
public int getPercent() { |
44 |
return iHistogramable.getPercent();
|
45 |
} |
46 |
|
47 |
/*
|
48 |
* (non-Javadoc)
|
49 |
* @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getTitle()
|
50 |
*/
|
51 |
public String getTitle() { |
52 |
return "Calculando histograma"; |
53 |
} |
54 |
} |