root / trunk / extensions / extRasterTools-SE / src / org / gvsig / rastertools / histogram / HistogramProcess.java @ 10963
History | View | Annotate | Download (1.85 KB)
1 | 10950 | bsanchez | 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 | 10963 | bsanchez | iHistogramable.getHistogram().getHistogram(); |
18 | |||
19 | 10950 | bsanchez | } catch (HistogramException e) {
|
20 | // TODO Auto-generated catch block
|
||
21 | e.printStackTrace(); |
||
22 | } |
||
23 | } |
||
24 | /*
|
||
25 | * (non-Javadoc)
|
||
26 | * @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getLabel()
|
||
27 | */
|
||
28 | public String getLabel() { |
||
29 | return "Generando histograma, por favor, espere..."; |
||
30 | } |
||
31 | |||
32 | /*
|
||
33 | * (non-Javadoc)
|
||
34 | * @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getLog()
|
||
35 | */
|
||
36 | public String getLog() { |
||
37 | return "Calculando histograma..."; |
||
38 | } |
||
39 | |||
40 | /*
|
||
41 | * (non-Javadoc)
|
||
42 | * @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getPercent()
|
||
43 | */
|
||
44 | public int getPercent() { |
||
45 | return iHistogramable.getPercent();
|
||
46 | } |
||
47 | |||
48 | /*
|
||
49 | * (non-Javadoc)
|
||
50 | * @see org.gvsig.gui.beans.IncrementableTask.IIncrementable#getTitle()
|
||
51 | */
|
||
52 | public String getTitle() { |
||
53 | return "Calculando histograma"; |
||
54 | } |
||
55 | 10963 | bsanchez | |
56 | /*
|
||
57 | * (non-Javadoc)
|
||
58 | * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#canceled()
|
||
59 | */
|
||
60 | public void canceled() { |
||
61 | this.suspend();
|
||
62 | } |
||
63 | |||
64 | /*
|
||
65 | * (non-Javadoc)
|
||
66 | * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#closed()
|
||
67 | */
|
||
68 | public void closed() { |
||
69 | this.suspend();
|
||
70 | } |
||
71 | |||
72 | /*
|
||
73 | * (non-Javadoc)
|
||
74 | * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#resumed()
|
||
75 | */
|
||
76 | public void resumed() { |
||
77 | this.resume();
|
||
78 | } |
||
79 | |||
80 | /*
|
||
81 | * (non-Javadoc)
|
||
82 | * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#suspended()
|
||
83 | */
|
||
84 | public void suspended() { |
||
85 | this.suspend();
|
||
86 | } |
||
87 | 10950 | bsanchez | } |