Revision 1034 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/MemoryShapeInfo.java

View differences:

MemoryShapeInfo.java
1
/* Generated by Together */
2 1
package com.iver.cit.gvsig.fmap.operations.strategies;
3 2

  
4 3
import java.awt.geom.Rectangle2D;
......
7 6

  
8 7

  
9 8
/**
10
 * DOCUMENT ME!
9
 * Estructura de datos con la informaci?n relativa a las geometr?as de una
10
 * fuente de datos necesaria para acelerar el procesado de la capa en memoria.
11 11
 *
12 12
 * @author Vicente Caballero Navarro
13 13
 */
14 14
public class MemoryShapeInfo implements ShapeInfo {
15
    ArrayList infos = new ArrayList();
15
	ArrayList infos = new ArrayList();
16 16

  
17
    /**
18
     * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(java.awt.geom.Rectangle2D,
19
     *      int)
20
     */
21
    public void addShapeInfo(Rectangle2D boundingBox, int type) {
22
        infos.add(new Info(boundingBox, type));
23
    }
17
	/**
18
	 * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(java.awt.geom.Rectangle2D,
19
	 * 		int)
20
	 */
21
	public void addShapeInfo(Rectangle2D boundingBox, int type) {
22
		infos.add(new Info(boundingBox, type));
23
	}
24 24

  
25
    /**
26
     * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(int,
27
     *      java.awt.geom.Rectangle2D, int)
28
     */
29
    public void setShapeInfo(int index, Rectangle2D boundingBox, int type)
30
        throws ArrayIndexOutOfBoundsException {
31
        infos.set(index, new Info(boundingBox, type));
32
    }
25
	/**
26
	 * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(int,
27
	 * 		java.awt.geom.Rectangle2D, int)
28
	 */
29
	public void setShapeInfo(int index, Rectangle2D boundingBox, int type)
30
		throws ArrayIndexOutOfBoundsException {
31
		infos.set(index, new Info(boundingBox, type));
32
	}
33 33

  
34
    /**
35
     * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getBoundingBox(int)
36
     */
37
    public Rectangle2D getBoundingBox(int index) {
38
        return ((Info) infos.get(index)).getRect();
39
    }
34
	/**
35
	 * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getBoundingBox(int)
36
	 */
37
	public Rectangle2D getBoundingBox(int index) {
38
		return ((Info) infos.get(index)).getRect();
39
	}
40 40

  
41
    /**
42
     * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getType(int)
43
     */
44
    public int getType(int index) {
45
        return ((Info) infos.get(index)).getType();
46
    }
41
	/**
42
	 * @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getType(int)
43
	 */
44
	public int getType(int index) {
45
		return ((Info) infos.get(index)).getType();
46
	}
47 47

  
48
    /**
49
     * DOCUMENT ME!
50
     *
51
     * @author Vicente Caballero Navarro
52
     */
53
    class Info {
54
        private Rectangle2D rect;
55
        private int type;
48
	/**
49
	 * Clase con el rect?ngulo y el tipo de shape.
50
	 *
51
	 * @author Vicente Caballero Navarro
52
	 */
53
	class Info {
54
		private Rectangle2D rect;
55
		private int type;
56 56

  
57
        /**
58
         * Crea un nuevo Info.
59
         *
60
         * @param rect DOCUMENT ME!
61
         * @param type DOCUMENT ME!
62
         */
63
        public Info(Rectangle2D rect, int type) {
64
            this.rect = rect;
65
            this.type = type;
66
        }
57
		/**
58
		 * Crea un nuevo Info.
59
		 *
60
		 * @param rect Extent del shape.
61
		 * @param type Tipo de shape.
62
		 */
63
		public Info(Rectangle2D rect, int type) {
64
			this.rect = rect;
65
			this.type = type;
66
		}
67 67

  
68
        /**
69
         * DOCUMENT ME!
70
         *
71
         * @return DOCUMENT ME!
72
         */
73
        public Rectangle2D getRect() {
74
            return rect;
75
        }
68
		/**
69
		 * Devuelve el extent del shape.
70
		 *
71
		 * @return Extent del shape.
72
		 */
73
		public Rectangle2D getRect() {
74
			return rect;
75
		}
76 76

  
77
        /**
78
         * DOCUMENT ME!
79
         *
80
         * @return DOCUMENT ME!
81
         */
82
        public int getType() {
83
            return type;
84
        }
85
    }
77
		/**
78
		 * Devuelve el tipo de shape.
79
		 *
80
		 * @return Tipo de shape.
81
		 */
82
		public int getType() {
83
			return type;
84
		}
85
	}
86 86
}

Also available in: Unified diff