svn-gvsig-desktop / 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 | 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 | 1005 | vcaballero | import org.cresques.cts.ICoordTrans; |
44 | |||
45 | 324 | fernando | import java.awt.Shape; |
46 | 3904 | fjp | import java.awt.geom.AffineTransform; |
47 | 2183 | fernando | import java.io.Serializable; |
48 | 324 | fernando | |
49 | |||
50 | /**
|
||
51 | 13293 | ppiqueras | * <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 | 324 | fernando | */
|
54 | 2183 | fernando | public interface FShape extends Shape, Serializable { |
55 | 13293 | ppiqueras | /**
|
56 | * Unknown or not defined type.
|
||
57 | */
|
||
58 | 324 | fernando | public final static int NULL = 0; |
59 | 13293 | ppiqueras | |
60 | /**
|
||
61 | * A geometric element that has zero dimensions and a location determinable by an ordered set
|
||
62 | * of coordinates
|
||
63 | */
|
||
64 | 1005 | vcaballero | public final static int POINT = 1; |
65 | 13293 | ppiqueras | |
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 | 1005 | vcaballero | public final static int LINE = 2; |
71 | 13293 | ppiqueras | |
72 | /**
|
||
73 | * A closed plane figure bounded by straight lines.
|
||
74 | */
|
||
75 | 1005 | vcaballero | public final static int POLYGON = 4; |
76 | 13293 | ppiqueras | |
77 | /**
|
||
78 | * Words, symbols and form of a written or printed work.
|
||
79 | */
|
||
80 | 1005 | vcaballero | public final static int TEXT = 8; |
81 | 13293 | ppiqueras | |
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 | 1005 | vcaballero | public final static int MULTI = 16; |
86 | 13293 | ppiqueras | |
87 | /**
|
||
88 | * A set of points.
|
||
89 | */
|
||
90 | 2194 | vcaballero | public final static int MULTIPOINT = 32; |
91 | 13293 | ppiqueras | |
92 | /**
|
||
93 | * A closed plane curve every point of which is equidistant from a fixed point within the curve.
|
||
94 | */
|
||
95 | 3748 | caballero | public final static int CIRCLE = 64; |
96 | 13293 | ppiqueras | |
97 | /**
|
||
98 | * A continuous portion (as of a circle or ellipse) of a curved line.
|
||
99 | */
|
||
100 | 3767 | caballero | public final static int ARC = 128; |
101 | 13293 | ppiqueras | |
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 | 3783 | caballero | public final static int ELLIPSE=256; |
108 | 13293 | ppiqueras | |
109 | /**
|
||
110 | * Indicates third coordinate. And can be combined with other geometries via the bits enabled.
|
||
111 | */
|
||
112 | 3783 | caballero | public final static int Z=512; |
113 | 13293 | ppiqueras | |
114 | 1005 | vcaballero | /**
|
115 | 13293 | ppiqueras | * Gets the geometry type of this shape.
|
116 | 1005 | vcaballero | *
|
117 | 13293 | ppiqueras | * @return int the geometry type of this shape.
|
118 | 1005 | vcaballero | */
|
119 | public int getShapeType(); |
||
120 | |||
121 | /**
|
||
122 | 13293 | ppiqueras | * Creates and returns a shape equal and independent of this one.
|
123 | 1005 | vcaballero | *
|
124 | 13293 | ppiqueras | * @return the new shape.
|
125 | 1005 | vcaballero | */
|
126 | public FShape cloneFShape();
|
||
127 | |||
128 | /**
|
||
129 | 13293 | ppiqueras | * Re-projects this shape using transformation coordinates.
|
130 | 1005 | vcaballero | *
|
131 | 13293 | ppiqueras | * @param ct the transformation coordinates
|
132 | 1005 | vcaballero | */
|
133 | public void reProject(ICoordTrans ct); |
||
134 | 13293 | ppiqueras | |
135 | 3833 | caballero | /**
|
136 | * Returns the handlers they utilized to stretch the geometries.
|
||
137 | *
|
||
138 | 13293 | ppiqueras | * @return Handlers the handlers used to stretch the geometries
|
139 | 3833 | caballero | */
|
140 | public Handler[] getStretchingHandlers(); |
||
141 | 13293 | ppiqueras | |
142 | 3833 | caballero | /**
|
143 | 13293 | ppiqueras | * Returns the handlers used to select the geometries.
|
144 | 3833 | caballero | *
|
145 | 13293 | ppiqueras | * @return Handlers the handlers used to select the geometries
|
146 | 3833 | caballero | */
|
147 | public Handler[] getSelectHandlers(); |
||
148 | 5880 | fjp | |
149 | 13293 | ppiqueras | /**
|
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 | 3904 | fjp | public void transform(AffineTransform at); |
157 | 324 | fernando | } |