Revision 11068 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/properties/DatasetHistogram.java

View differences:

DatasetHistogram.java
51 51
	private RasterDataset				dataset = null;
52 52
	
53 53
	private int percent = 0;
54
	private boolean canceled = false;
54 55
	
55 56
	/**
56 57
	 * Constructor
......
115 116
				byte[] bLine = (byte[])obj;
116 117
				for (int k = 0; k < bLine.length; k++)
117 118
					histogram.incrementPxValue(band, (bLine[k] & 0xff));
119
				if (isCanceled()) return null;
118 120
				percent = ((band * dataset.getHeight() + line) * 100) / (dataset.getBandCount() * dataset.getHeight());
119 121
			}
120 122
		} 
......
183 185
	public int getPercent() {
184 186
		return percent;
185 187
	}
188
	
189
	public void setCanceled(boolean value) {
190
		canceled = value;
191
	}
192
	
193
	public boolean isCanceled() {
194
		return canceled;
195
	}
186 196
}

Also available in: Unified diff