Revision 24160 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayer.java

View differences:

FLayer.java
378 378
	 * @see #setEditing(boolean)
379 379
	 */
380 380
	public boolean isEditing();
381
	/**
382
	 * <p>Uses or not a <code>BufferedImage</code> image that represents the drawn layers.</p>
383
	 *
384
	 * @return <code>true</code> if uses that kind of image; <code>false</code> otherwise
385
	 *
386
	 * @see #setCachingDrawnLayers(boolean)
387
	 */
388
	public boolean isCachingDrawnLayers();
389
	/**
390
	 * <p>Set <code>true</code> if you want this layer to store an image of previous layers.
391
	 *  Then, if you perform a <code>FLayers#invalidateLayer()</code>, the system will
392
	 *  redraw only this layers you are requesting.</p>
393
	 *
394
	 *  @param bCacheDrawnLayers the boolean to be set
395
	 *
396
	 *  @see #isCachingDrawnLayers()
397
	 */
398
//	* <p>Another option could be store an image of each layer drawn, and call each one using something
399
//	*  like "invalidate()". On having rendered, it's possible to see if it's invalidated, and if itsn't,
400
//	*  paste the cached image.</p>
401
//	*
402
//	* <p> ERROR!: You can't cache that image, because if the background has changed, the antialiasing
403
//	*  will affect the draw of that layer. However, it would be useful draw the cached image of each layer
404
//	*  that aren't invalidated, and from that appears one of them invalidated, the rest already have to draw.
405
//	*  The problem is that continues spending more memory</p>
406
//	*
407
//	* @param bCacheDrawnLayers
408
//	*/
409
	public void setCachingDrawnLayers(boolean bCacheDrawnLayers);
410 381

  
411 382
	/**
412 383
	 * Returns the image icon that will be shown in the TOC next to this layer.
......
429 400
	 */
430 401
	void setInTOC(boolean b);
431 402
	/**
432
	 * <p>Returns if this layer needs or doesn't need a repaint.
433
	 *
434
	 * @return <code>true</code> if this layer need a repaint; <code>false</code> otherwise
435
	 *
436
	 * @see #setDirty(boolean)
437
	 */
438
	public boolean isDirty();
439

  
440
	/**
441
	 * <p>Changes the status of this layer to dirty if needs a repaint.</p>
442
	 *
443
	 * <p>By default, all layers will be set to dirty when the extent changes. But for events like changing
444
	 * its legend, or editing a layer, we could perform some optimization using the private method <code>MapContext#prepareDrawing</code> from <code>MapContext</code>.</p>
445
	 *
446
	 * @param dirty <code>true</code> if this layer needs a repaint
447
	 *
448
	 * @see #isDirty()
449
	 */
450
	public void setDirty(boolean dirty);
451
	/**
452
	 * Returns the image with bands, of the drawn layers.
453
	 *
454
	 * @return an image with bands
455
	 *
456
	 * @see #setCacheImageDrawnLayers(BufferedImage)
457
	 */
458
	public BufferedImage getCacheImageDrawnLayers();
459
	/**
460
	 * Sets the image with bands, for the drawn layers.
461
	 *
462
	 * @param cacheImageDrawnLayers an image with bands
463
	 *
464
	 * @see #getCacheImageDrawnLayers()
465
	 */
466
	public void setCacheImageDrawnLayers(BufferedImage cacheImageDrawnLayers);
467
	/**
468 403
	 * Returns the status of this layer.
469 404
	 *
470 405
	 * @return the status stored in a <code>FLayerStatus</code> object
......
687 622
	 */
688 623
	public URI[] getLink(Point2D point, double tolerance);
689 624

  
625

  
626

  
627
	public long getDrawVersion();
628

  
690 629
}

Also available in: Unified diff