Revision 210 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/grid/render/Render.java

View differences:

Render.java
22 22
package org.gvsig.fmap.dal.coverage.grid.render;
23 23

  
24 24
import java.awt.Graphics2D;
25
import java.awt.Image;
26 25

  
27 26
import org.gvsig.fmap.dal.coverage.dataset.Buffer;
28 27
import org.gvsig.fmap.dal.coverage.datastruct.ViewPortData;
......
40 39
 * Renders a Grid object 
41 40
 * @author Nacho Brodin (nachobrodin@gmail.com)
42 41
 */
43
public interface Render {
42
public interface Render extends Runnable {
43
	
44 44
	/**
45 45
	 * Obtiene las lista de filtros aplicados en la renderizaci?n
46 46
	 * @return RasterFilterList
......
189 189
	 * @throws InvalidSetViewException
190 190
	 * @throws ArrayIndexOutOfBoundsException
191 191
	 */
192
	public Image draw(Graphics2D g, ViewPortData vp)
192
	public void draw(Graphics2D g, ViewPortData vp)
193 193
		throws RasterDriverException, InvalidSetViewException, ProcessInterruptedException;
194
	
195
	/**
196
	 * <p>
197
	 * This method throws the draw call in a Thread. This is useful to draw tiles.
198
	 * </p>
199
	 * <p>
200
	 * Strategy:
201
	 * <ul>
202
	 * <li>If the image is out of the view the thread won't be thrown</li>
203
	 * <li>Throw the thread to draw</li>
204
	 * <li>The main thread waits until the secondary thread ends</li>
205
	 * <li>When the buffer of a new tile has been received then nextBuffer is called from the store</li>
206
	 * <li>When the last tile has been received then endReading is called from the store. This method unlocks the main
207
	 * thread and will finish the process</li>
208
	 * <li></li>
209
	 * </ul> 
210
	 * </p>
211
	 * 
212
	 * @see draw
213
	 */
214
	public void drawThread(Graphics2D g, ViewPortData vp);
215
	
216
	/**
217
	 * Sets the view structures to draw
218
	 * @param g
219
	 * @param vp
220
	 */
221
	public void setGraphicInfo(Graphics2D g, ViewPortData vp);
222
	
223
	public void setReading(boolean reading);
194 224
}

Also available in: Unified diff