root / tags / v1_1_Build_1015 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / core / FShape.java @ 13679
History | View | Annotate | Download (4.06 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 org.cresques.cts.ICoordTrans; |
44 |
|
45 |
import java.awt.Shape; |
46 |
import java.awt.geom.AffineTransform; |
47 |
import java.io.Serializable; |
48 |
|
49 |
|
50 |
/**
|
51 |
* <p>The interface <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 |
* Unknown or not defined type.
|
57 |
*/
|
58 |
public final static int NULL = 0; |
59 |
|
60 |
/**
|
61 |
* A geometric element that has zero dimensions and a location determinable by an ordered set
|
62 |
* of coordinates
|
63 |
*/
|
64 |
public final static int POINT = 1; |
65 |
|
66 |
/**
|
67 |
* 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.
|
69 |
*/
|
70 |
public final static int LINE = 2; |
71 |
|
72 |
/**
|
73 |
* A closed plane figure bounded by straight lines.
|
74 |
*/
|
75 |
public final static int POLYGON = 4; |
76 |
|
77 |
/**
|
78 |
* Words, symbols and form of a written or printed work.
|
79 |
*/
|
80 |
public final static int TEXT = 8; |
81 |
|
82 |
/**
|
83 |
* A set that can contain points, lines and polygons. This is usual in <i>CAD</i> layers <i>(dxf, dgn, dwg)</i>.
|
84 |
*/
|
85 |
public final static int MULTI = 16; |
86 |
|
87 |
/**
|
88 |
* A set of points.
|
89 |
*/
|
90 |
public final static int MULTIPOINT = 32; |
91 |
|
92 |
/**
|
93 |
* A closed plane curve every point of which is equidistant from a fixed point within the curve.
|
94 |
*/
|
95 |
public final static int CIRCLE = 64; |
96 |
|
97 |
/**
|
98 |
* A continuous portion (as of a circle or ellipse) of a curved line.
|
99 |
*/
|
100 |
public final static int ARC = 128; |
101 |
|
102 |
/**
|
103 |
* 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.
|
106 |
*/
|
107 |
public final static int ELLIPSE=256; |
108 |
|
109 |
/**
|
110 |
* Indicates third coordinate. And can be combined with other geometries via the bits enabled.
|
111 |
*/
|
112 |
public final static int Z=512; |
113 |
|
114 |
/**
|
115 |
* Gets the geometry type of this shape.
|
116 |
*
|
117 |
* @return int the geometry type of this shape.
|
118 |
*/
|
119 |
public int getShapeType(); |
120 |
|
121 |
/**
|
122 |
* Creates and returns a shape equal and independent of this one.
|
123 |
*
|
124 |
* @return the new shape.
|
125 |
*/
|
126 |
public FShape cloneFShape();
|
127 |
|
128 |
/**
|
129 |
* Re-projects this shape using transformation coordinates.
|
130 |
*
|
131 |
* @param ct the transformation coordinates
|
132 |
*/
|
133 |
public void reProject(ICoordTrans ct); |
134 |
|
135 |
/**
|
136 |
* Returns the handlers they utilized to stretch the geometries.
|
137 |
*
|
138 |
* @return Handlers the handlers used to stretch the geometries
|
139 |
*/
|
140 |
public Handler[] getStretchingHandlers(); |
141 |
|
142 |
/**
|
143 |
* Returns the handlers used to select the geometries.
|
144 |
*
|
145 |
* @return Handlers the handlers used to select the geometries
|
146 |
*/
|
147 |
public Handler[] getSelectHandlers(); |
148 |
|
149 |
/**
|
150 |
* Executes a 2D transformation on this shape, using six parameters.
|
151 |
*
|
152 |
* @param at object that allows execute the affine transformation
|
153 |
*
|
154 |
* @see AffineTransform
|
155 |
*/
|
156 |
public void transform(AffineTransform at); |
157 |
} |