Revision 24862 trunk/extensions/extRasterTools-SE/src/org/gvsig/raster/beans/canvas/DrawableElement.java

View differences:

DrawableElement.java
30 30
public abstract class DrawableElement {
31 31
	protected Color   color     = Color.BLACK;
32 32
	private boolean   firstDraw = true;
33
	private boolean   drawing   = true;
33 34

  
34 35
	/**
35 36
	 * Entorno donde se dibuja
......
42 43
	 * @param g
43 44
	 */
44 45
	public void draw(Graphics g) {
46
		if(!drawing)
47
			return;
45 48
		if (firstDraw) {
46 49
			firstDrawActions();
47 50
			firstDraw = false;
48 51
		}
49 52
		paint(g);
50 53
	}
54
	
55
	/**
56
	 * Asigna el flag de dibujado del elemento gr?fico
57
	 * @param draw
58
	 */
59
	public void setDrawing(boolean drawing) {
60
		this.drawing = drawing;
61
	}
62
	
63
	/**
64
	 * Obtiene el flag que informa si el elemento gr?fico est? dibujandose
65
	 * o no.
66
	 * @return
67
	 */
68
	public boolean isDrawing() {
69
		return this.drawing;
70
	}
51 71

  
52 72
	/**
53 73
	 * Dibujado del elemento gr?fico

Also available in: Unified diff