Statistics
| Revision:

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

History | View | Annotate | Download (4.34 KB)

1
/* 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
package com.iver.cit.gvsig.fmap.core;
42

    
43
import java.awt.Shape;
44
import java.awt.geom.AffineTransform;
45
import java.io.Serializable;
46

    
47
import org.cresques.cts.ICoordTrans;
48

    
49

    
50
/**
51
 * <p><code>FShape</code> extends <code>Shape</code> adding shape types, and allowing
52
 *  to work with it as a geometry.</p>
53
 */
54
public interface FShape extends Shape, Serializable {
55
        /**
56
         * <p>Unknown or not defined type.</p>
57
         */
58
        public final static int NULL = 0;
59

    
60
        /**
61
         * <p>A geometric element that has zero dimensions and a location determinable by an ordered set
62
         *  of coordinates.</p>
63
         */
64
        public final static int POINT = 1;
65

    
66
        /**
67
         * <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
         */
70
        public final static int LINE = 2;
71

    
72
        /**
73
         * <p>A closed plane figure bounded by straight lines.</p>
74
         */
75
        public final static int POLYGON = 4;
76

    
77
        /**
78
         * <p>Words, symbols and form of a written or printed work.</p>
79
         */
80
        public final static int TEXT = 8;
81

    
82
        /**
83
         * <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
         */
85
        public final static int MULTI = 16;
86

    
87
        /**
88
         * <p>A set of points.</p>
89
         */
90
        public final static int MULTIPOINT = 32;
91

    
92
        /**
93
         * <p>A closed plane curve every point of which is equidistant from a fixed point within the curve.</p>
94
         */
95
        public final static int CIRCLE = 64;
96

    
97
        /**
98
         * <p>A continuous portion (as of a circle or ellipse) of a curved line.</p>
99
         */
100
        public final static int ARC = 128;
101

    
102
        /**
103
         *  <p>A closed plane curve generated by a point moving in such a way that the sums of its distances
104
         *   from two fixed points is a constant : a plane section of a right circular cone that is a closed
105
         *   curve.</p>
106
         */
107
        public final static int ELLIPSE=256;
108

    
109
        /**
110
         * <p>Indicates third coordinate. And can be combined with other geometries via the bits enabled.</p>
111
         */
112
        public final static int Z=512;
113
        
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

    
119
        /**
120
         * <p>Gets the geometry type that identifies this shape.</p>
121
         *
122
         * @return int the geometry type that identifies this shape.
123
         */
124
        public int getShapeType();
125

    
126
        /**
127
         * <p>Creates and returns a shape equal and independent of this one.</p>
128
         *
129
         * @return the new shape.
130
         */
131
        public FShape cloneFShape();
132

    
133
        /**
134
         * <p>Re-projects this shape using <code>ct</code> as transformation coordinates.</p>
135
         *
136
         * @param ct the transformation coordinates
137
         */
138
        public void reProject(ICoordTrans ct);
139

    
140
        /**
141
         * <p>Returns the handlers they utilized to stretch the geometries.</p>
142
         *
143
         * @return Handlers the handlers used to stretch the geometries
144
         */
145
        public Handler[] getStretchingHandlers();
146

    
147
        /**
148
         * <p>Returns the handlers used to select the geometries.</p>
149
         *
150
         * @return Handlers the handlers used to select the geometries
151
         */
152
        public Handler[] getSelectHandlers();
153
        
154
        /**
155
         * <p>Executes a 2D transformation on this shape, using six parameters.</p>
156
         * 
157
         * @param at object that allows execute the affine transformation
158
         * 
159
         * @see AffineTransform
160
         */
161
        public void transform(AffineTransform at);
162
}