Revision 1081 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/properties/MultiProviderHistogramComputer.java

View differences:

MultiProviderHistogramComputer.java
71 71

  
72 72
				for (int i = 0; i < hList.length; i++) {
73 73
					RasterProvider internalProvider = provider.getInternalProvider(i);
74
					try {
75
						hList[i] = ((Histogramable)internalProvider).getHistogramComputer().getBufferHistogram();
76
					} catch (InterruptedException e) {
77
						throw new ProcessInterruptedException(e);
78
					}
74
					hList[i] = ((Histogramable)internalProvider).getHistogramComputer().getBufferHistogram();
75
					
79 76
					if (hList[i] == null) 
80 77
						return null;
81 78
				}
......
118 115
	 * Pone a cero el porcentaje de progreso del proceso de calculo de histograma
119 116
	 */
120 117
	public void resetPercent() {
121
		for (int i = 0; i < provider.getInternalProviderCount(); i++)
122
			try {
123
				((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().resetPercent();
124
			} catch (HistogramException e) {
125
			} catch (InterruptedException e) {
126
			}
118
		for (int i = 0; i < provider.getInternalProviderCount(); i++) {
119
			((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().resetPercent();
120
		}
127 121
	}
128 122

  
129 123
	/**
......
133 127
	public int getPercent() {
134 128
		int partial = 0;
135 129
		for (int i = 0; i < provider.getInternalProviderCount(); i++)
136
			try {
137
				partial += ((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().getPercent();
138
			} catch (HistogramException e) {
139
				e.printStackTrace();
140
			} catch (InterruptedException e) {
141
				e.printStackTrace();
142
			}
130
			partial += ((Histogramable)provider.getInternalProvider(i)).getHistogramComputer().getPercent();
143 131
		percent += (int)(partial / provider.getInternalProviderCount());
144 132
		return percent;
145 133
	}
......
151 139
	public double getMaximum() {
152 140
		double max = 0;
153 141
		for (int i = 0; i < provider.getInternalProviderCount(); i++) {
154
			try {
155
				double m = provider.getInternalProvider(i).getHistogramComputer().getMaximum();
156
				if(m > max)
157
					max = m;
158
			} catch (HistogramException e) {
159
			} catch (InterruptedException e) {
160
			}
142
			double m = provider.getInternalProvider(i).getHistogramComputer().getMaximum();
143
			if(m > max)
144
				max = m;
161 145
		}
162 146
		return max;
163 147
	}
......
169 153
	public double getMinimum() {
170 154
		double min = Double.POSITIVE_INFINITY;
171 155
		for (int i = 0; i < provider.getInternalProviderCount(); i++) {
172
			try {
173
				double m = provider.getInternalProvider(i).getHistogramComputer().getMinimum();
174
				if(m < min)
175
					min = m;
176
			} catch (HistogramException e) {
177
			} catch (InterruptedException e) {
178
			}
156
			double m = provider.getInternalProvider(i).getHistogramComputer().getMinimum();
157
			if(m < min)
158
				min = m;
179 159
		}
180 160
		return min;
181 161
	}
182
	
162

  
183 163
	/*
184 164
	 * (non-Javadoc)
185 165
	 * @see org.gvsig.fmap.dal.coverage.store.props.HistogramComputer#refreshHistogram()
......
195 175
	public int getNumberOfProviders() {
196 176
		return files;
197 177
	}
178

  
179
	public String getLog() {
180
		return null;
181
	}
182

  
183
	public boolean isCancelable() {
184
		return true;
185
	}
186

  
187
	public boolean isPausable() {
188
		return false;
189
	}
190

  
191
	public void setPercent(int value) {
192
		
193
	}
198 194
}

Also available in: Unified diff