Statistics
| Revision:

root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / core / FShape.java @ 38563

History | View | Annotate | Download (4.34 KB)

1 1100 fjp
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41 324 fernando
package com.iver.cit.gvsig.fmap.core;
42
43
import java.awt.Shape;
44 3904 fjp
import java.awt.geom.AffineTransform;
45 2183 fernando
import java.io.Serializable;
46 324 fernando
47 10627 caballero
import org.cresques.cts.ICoordTrans;
48 324 fernando
49 10627 caballero
50 324 fernando
/**
51 20098 jmvivo
 * <p><code>FShape</code> extends <code>Shape</code> adding shape types, and allowing
52 14289 jvidal
 *  to work with it as a geometry.</p>
53 324 fernando
 */
54 2183 fernando
public interface FShape extends Shape, Serializable {
55 14289 jvidal
        /**
56 20098 jmvivo
         * <p>Unknown or not defined type.</p>
57 14289 jvidal
         */
58 324 fernando
        public final static int NULL = 0;
59 20098 jmvivo
60 14289 jvidal
        /**
61 20098 jmvivo
         * <p>A geometric element that has zero dimensions and a location determinable by an ordered set
62
         *  of coordinates.</p>
63 14289 jvidal
         */
64 1005 vcaballero
        public final static int POINT = 1;
65 20098 jmvivo
66 14289 jvidal
        /**
67 20098 jmvivo
         * <p>A straight or curved geometric element that is generated by a moving point and that has extension
68
         *  only along the path of the point.</p>
69 14289 jvidal
         */
70 1005 vcaballero
        public final static int LINE = 2;
71 20098 jmvivo
72 14289 jvidal
        /**
73 20098 jmvivo
         * <p>A closed plane figure bounded by straight lines.</p>
74 14289 jvidal
         */
75 20098 jmvivo
        public final static int POLYGON = 4;
76 14289 jvidal
77
        /**
78 20098 jmvivo
         * <p>Words, symbols and form of a written or printed work.</p>
79 14289 jvidal
         */
80 1005 vcaballero
        public final static int TEXT = 8;
81 20098 jmvivo
82 14289 jvidal
        /**
83 20098 jmvivo
         * <p>A set that can contain points, lines and polygons. This is usual in <i>CAD</i> layers <i>(dxf, dgn, dwg)</i>.</p>
84 14289 jvidal
         */
85 1005 vcaballero
        public final static int MULTI = 16;
86 20098 jmvivo
87 14289 jvidal
        /**
88 20098 jmvivo
         * <p>A set of points.</p>
89 14289 jvidal
         */
90 2194 vcaballero
        public final static int MULTIPOINT = 32;
91 20098 jmvivo
92 14289 jvidal
        /**
93 20098 jmvivo
         * <p>A closed plane curve every point of which is equidistant from a fixed point within the curve.</p>
94 14289 jvidal
         */
95 3748 caballero
        public final static int CIRCLE = 64;
96 20098 jmvivo
97 14289 jvidal
        /**
98 20098 jmvivo
         * <p>A continuous portion (as of a circle or ellipse) of a curved line.</p>
99 14289 jvidal
         */
100 3767 caballero
        public final static int ARC = 128;
101 20098 jmvivo
102 14289 jvidal
        /**
103 20098 jmvivo
         *  <p>A closed plane curve generated by a point moving in such a way that the sums of its distances
104 14289 jvidal
         *   from two fixed points is a constant : a plane section of a right circular cone that is a closed
105 20098 jmvivo
         *   curve.</p>
106 14289 jvidal
         */
107 3783 caballero
        public final static int ELLIPSE=256;
108 20098 jmvivo
109 14289 jvidal
        /**
110 20098 jmvivo
         * <p>Indicates third coordinate. And can be combined with other geometries via the bits enabled.</p>
111 14289 jvidal
         */
112 3783 caballero
        public final static int Z=512;
113 24154 jpiera
114
        /**
115
         * <p>Indicates M coordinate. And can be combined with other geometries via the bits enabled.</p>
116
         */
117
        public final static int M=1024;
118 20098 jmvivo
119 1005 vcaballero
        /**
120 20098 jmvivo
         * <p>Gets the geometry type that identifies this shape.</p>
121 1005 vcaballero
         *
122 20098 jmvivo
         * @return int the geometry type that identifies this shape.
123 1005 vcaballero
         */
124
        public int getShapeType();
125
126
        /**
127 20098 jmvivo
         * <p>Creates and returns a shape equal and independent of this one.</p>
128 1005 vcaballero
         *
129 14289 jvidal
         * @return the new shape.
130 1005 vcaballero
         */
131
        public FShape cloneFShape();
132 20098 jmvivo
133 1005 vcaballero
        /**
134 20098 jmvivo
         * <p>Re-projects this shape using <code>ct</code> as transformation coordinates.</p>
135 1005 vcaballero
         *
136 14289 jvidal
         * @param ct the transformation coordinates
137 1005 vcaballero
         */
138
        public void reProject(ICoordTrans ct);
139 14289 jvidal
140 3833 caballero
        /**
141 20098 jmvivo
         * <p>Returns the handlers they utilized to stretch the geometries.</p>
142 3833 caballero
         *
143 14289 jvidal
         * @return Handlers the handlers used to stretch the geometries
144 3833 caballero
         */
145
        public Handler[] getStretchingHandlers();
146 14289 jvidal
147 3833 caballero
        /**
148 20098 jmvivo
         * <p>Returns the handlers used to select the geometries.</p>
149 3833 caballero
         *
150 14289 jvidal
         * @return Handlers the handlers used to select the geometries
151 3833 caballero
         */
152
        public Handler[] getSelectHandlers();
153 20098 jmvivo
154 14289 jvidal
        /**
155 20098 jmvivo
         * <p>Executes a 2D transformation on this shape, using six parameters.</p>
156 14289 jvidal
         *
157
         * @param at object that allows execute the affine transformation
158
         *
159
         * @see AffineTransform
160
         */
161 3904 fjp
        public void transform(AffineTransform at);
162 324 fernando
}