Revision 39296
tags/v2_0_0_Build_2059/extensions/extEditing/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
5 |
http://maven.apache.org/maven-v4_0_0.xsd"> |
|
6 |
<modelVersion>4.0.0</modelVersion> |
|
7 |
<artifactId>org.gvsig.editing</artifactId> |
|
8 |
<name>Tools: Geometry editing</name> |
|
9 |
<version>2.0-SNAPSHOT</version> |
|
10 |
<parent> |
|
11 |
<artifactId>gvsig-base-extension-pom</artifactId> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<version>2.0-SNAPSHOT</version> |
|
14 |
</parent> |
|
15 |
<description>Editing support for vectorial layers. |
|
16 |
- Insert drawing elements (point, line, polyline, polygon, etc.) |
|
17 |
- Insert geometric elements (circle, rectangle, ellipse, etc.) |
|
18 |
- Copy / move / rotate / scale graphic elements.. |
|
19 |
- Vertex editing |
|
20 |
- Undo / redo |
|
21 |
- Command window |
|
22 |
- Snapping |
|
23 |
</description> |
|
24 |
<build> |
|
25 |
<sourceDirectory>src</sourceDirectory> |
|
26 |
<testSourceDirectory>src-test</testSourceDirectory> |
|
27 |
<plugins> |
|
28 |
<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION --> |
|
29 |
<plugin> |
|
30 |
<groupId>org.apache.maven.plugins</groupId> |
|
31 |
<artifactId>maven-surefire-plugin</artifactId> |
|
32 |
<configuration> |
|
33 |
<skipTests>true</skipTests> |
|
34 |
</configuration> |
|
35 |
</plugin> |
|
36 |
</plugins> |
|
37 |
</build> |
|
38 |
<dependencies> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.ui</artifactId> |
|
42 |
<scope>compile</scope> |
|
43 |
</dependency> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.i18n</artifactId> |
|
47 |
<scope>compile</scope> |
|
48 |
</dependency> |
|
49 |
<dependency> |
|
50 |
<groupId>org.gvsig</groupId> |
|
51 |
<artifactId>org.gvsig.app</artifactId> |
|
52 |
<version>2.0-SNAPSHOT</version> |
|
53 |
<scope>compile</scope> |
|
54 |
</dependency> |
|
55 |
<dependency> |
|
56 |
<groupId>org.gvsig</groupId> |
|
57 |
<artifactId>org.gvsig.app.document.table.app.mainplugin</artifactId> |
|
58 |
<version>2.0.0-SNAPSHOT</version> |
|
59 |
<scope>compile</scope> |
|
60 |
</dependency> |
|
61 |
<dependency> |
|
62 |
<groupId>net.sf.smc</groupId> |
|
63 |
<artifactId>smc</artifactId> |
|
64 |
<scope>compile</scope> |
|
65 |
</dependency> |
|
66 |
<dependency> |
|
67 |
<groupId>org.gvsig</groupId> |
|
68 |
<artifactId>org.gvsig.symbology.lib.api</artifactId> |
|
69 |
<scope>compile</scope> |
|
70 |
</dependency> |
|
71 |
<dependency> |
|
72 |
<groupId>org.gvsig</groupId> |
|
73 |
<artifactId>org.gvsig.symbology.swing.api</artifactId> |
|
74 |
<scope>compile</scope> |
|
75 |
</dependency> |
|
76 |
<dependency> |
|
77 |
<groupId>org.gvsig</groupId> |
|
78 |
<artifactId>org.gvsig.fmap.geometry</artifactId> |
|
79 |
<scope>compile</scope> |
|
80 |
</dependency> |
|
81 |
<dependency> |
|
82 |
<groupId>org.gvsig</groupId> |
|
83 |
<artifactId>org.gvsig.timesupport.lib.api</artifactId> |
|
84 |
<scope>compile</scope> |
|
85 |
</dependency> |
|
86 |
<dependency> |
|
87 |
<groupId>org.gvsig</groupId> |
|
88 |
<artifactId>org.gvsig.fmap.geometry</artifactId> |
|
89 |
<classifier>operation</classifier> |
|
90 |
<scope>compile</scope> |
|
91 |
</dependency> |
|
92 |
<dependency> |
|
93 |
<groupId>org.gvsig</groupId> |
|
94 |
<artifactId>org.gvsig.fmap.dal</artifactId> |
|
95 |
<scope>compile</scope> |
|
96 |
</dependency> |
|
97 |
<dependency> |
|
98 |
<groupId>org.gvsig</groupId> |
|
99 |
<artifactId>org.gvsig.fmap.dal</artifactId> |
|
100 |
<classifier>spi</classifier> |
|
101 |
<scope>compile</scope> |
|
102 |
</dependency> |
|
103 |
<dependency> |
|
104 |
<groupId>org.gvsig</groupId> |
|
105 |
<artifactId>org.gvsig.fmap.dal</artifactId> |
|
106 |
<classifier>impl</classifier> |
|
107 |
<scope>compile</scope> |
|
108 |
</dependency> |
|
109 |
<dependency> |
|
110 |
<groupId>org.gvsig</groupId> |
|
111 |
<artifactId>org.gvsig.fmap.dal.file</artifactId> |
|
112 |
<scope>compile</scope> |
|
113 |
</dependency> |
|
114 |
<dependency> |
|
115 |
<groupId>org.gvsig</groupId> |
|
116 |
<artifactId>org.gvsig.fmap.dal.file</artifactId> |
|
117 |
<classifier>store.shp</classifier> |
|
118 |
<scope>compile</scope> |
|
119 |
</dependency> |
|
120 |
<dependency> |
|
121 |
<groupId>org.gvsig</groupId> |
|
122 |
<artifactId>org.gvsig.fmap.dal.file</artifactId> |
|
123 |
<classifier>store.dbf</classifier> |
|
124 |
<scope>compile</scope> |
|
125 |
</dependency> |
|
126 |
<dependency> |
|
127 |
<groupId>org.gvsig</groupId> |
|
128 |
<artifactId>org.gvsig.fmap.dal.file</artifactId> |
|
129 |
<classifier>store.dxf</classifier> |
|
130 |
<scope>compile</scope> |
|
131 |
</dependency> |
|
132 |
<dependency> |
|
133 |
<groupId>org.gvsig</groupId> |
|
134 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
135 |
<scope>compile</scope> |
|
136 |
</dependency> |
|
137 |
<dependency> |
|
138 |
<groupId>org.gvsig</groupId> |
|
139 |
<artifactId>org.gvsig.andami</artifactId> |
|
140 |
<scope>compile</scope> |
|
141 |
</dependency> |
|
142 |
<dependency> |
|
143 |
<groupId>org.gvsig</groupId> |
|
144 |
<artifactId>org.gvsig.fmap.mapcontext</artifactId> |
|
145 |
<scope>compile</scope> |
|
146 |
</dependency> |
|
147 |
<dependency> |
|
148 |
<groupId>org.gvsig</groupId> |
|
149 |
<artifactId>org.gvsig.fmap.mapcontext</artifactId> |
|
150 |
<classifier>operation</classifier> |
|
151 |
<scope>compile</scope> |
|
152 |
</dependency> |
|
153 |
<dependency> |
|
154 |
<groupId>org.gvsig</groupId> |
|
155 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
156 |
<scope>compile</scope> |
|
157 |
</dependency> |
|
158 |
<dependency> |
|
159 |
<groupId>org.gvsig</groupId> |
|
160 |
<artifactId>org.gvsig.projection</artifactId> |
|
161 |
<scope>compile</scope> |
|
162 |
</dependency> |
|
163 |
<dependency> |
|
164 |
<groupId>org.gvsig</groupId> |
|
165 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
166 |
<scope>compile</scope> |
|
167 |
</dependency> |
|
168 |
<dependency> |
|
169 |
<groupId>org.gvsig</groupId> |
|
170 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
171 |
<scope>compile</scope> |
|
172 |
</dependency> |
|
173 |
<dependency> |
|
174 |
<groupId>org.gvsig</groupId> |
|
175 |
<artifactId>org.gvsig.utils</artifactId> |
|
176 |
<scope>compile</scope> |
|
177 |
</dependency> |
|
178 |
<dependency> |
|
179 |
<groupId>org.gvsig</groupId> |
|
180 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
181 |
<scope>compile</scope> |
|
182 |
</dependency> |
|
183 |
<dependency> |
|
184 |
<groupId>org.slf4j</groupId> |
|
185 |
<artifactId>slf4j-api</artifactId> |
|
186 |
<scope>compile</scope> |
|
187 |
</dependency> |
|
188 |
<dependency> |
|
189 |
<groupId>jwizardcomponent</groupId> |
|
190 |
<artifactId>jwizardcomponent</artifactId> |
|
191 |
<scope>compile</scope> |
|
192 |
</dependency> |
|
193 |
<dependency> |
|
194 |
<groupId>com.vividsolutions</groupId> |
|
195 |
<artifactId>jts</artifactId> |
|
196 |
<scope>compile</scope> |
|
197 |
</dependency> |
|
198 |
<dependency> |
|
199 |
<groupId>org.apache.xmlgraphics</groupId> |
|
200 |
<artifactId>batik-awt-util</artifactId> |
|
201 |
<scope>compile</scope> |
|
202 |
</dependency> |
|
203 |
<dependency> |
|
204 |
<groupId>org.gvsig</groupId> |
|
205 |
<artifactId>org.gvsig.exportto.app.extension</artifactId> |
|
206 |
<version>1.0.0-SNAPSHOT</version> |
|
207 |
<scope>compile</scope> |
|
208 |
</dependency> |
|
209 |
</dependencies> |
|
210 |
|
|
211 |
<properties> |
|
212 |
<build-dir>${basedir}/../build</build-dir> |
|
213 |
<eclipse.project.name>extEditing</eclipse.project.name> |
|
214 |
<package.info.dependencies>required: org.gvsig.app.document.table.app.mainplugin -ge 2, required: org.gvsig.exportto.app.extension -ge 1</package.info.dependencies> |
|
215 |
<package.info.state>beta2</package.info.state> |
|
216 |
<!-- alpha-devel --> |
|
217 |
<package.info.categories>View,Vector</package.info.categories> |
|
218 |
</properties> |
|
219 |
</project> |
tags/v2_0_0_Build_2059/extensions/extEditing/.cvsignore | ||
---|---|---|
1 |
bin |
|
2 |
bin-test |
|
0 | 3 |
tags/v2_0_0_Build_2059/extensions/extEditing/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Extructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>config</directory> |
|
10 |
<outputDirectory>${extension.install.dir.name} |
|
11 |
</outputDirectory> |
|
12 |
</fileSet> |
|
13 |
<fileSet> |
|
14 |
<directory>images</directory> |
|
15 |
<outputDirectory>/${extension.install.dir.name}/images |
|
16 |
</outputDirectory> |
|
17 |
</fileSet> |
|
18 |
</fileSets> |
|
19 |
<files> |
|
20 |
<file> |
|
21 |
<source>package.info</source> |
|
22 |
<outputDirectory>${extension.install.dir.name} |
|
23 |
</outputDirectory> |
|
24 |
</file> |
|
25 |
</files> |
|
26 |
<!-- |
|
27 |
*********************************************************************** |
|
28 |
--> |
|
29 |
<!-- * *--> |
|
30 |
<!-- |
|
31 |
*********************************************************************** |
|
32 |
--> |
|
33 |
<dependencySets> |
|
34 |
<dependencySet> |
|
35 |
<outputDirectory>${extension.install.dir.name}/${library-dir} |
|
36 |
</outputDirectory> |
|
37 |
<includes> |
|
38 |
<include>org.gvsig:org.gvsig.editing</include> |
|
39 |
</includes> |
|
40 |
</dependencySet> |
|
41 |
<dependencySet> |
|
42 |
<outputDirectory>${extension.install.dir.name}/${library-dir}</outputDirectory> |
|
43 |
<includes> |
|
44 |
<include>net.sf.smc:smc</include> |
|
45 |
</includes> |
|
46 |
</dependencySet> |
|
47 |
</dependencySets> |
|
48 |
</assembly> |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/PolylineCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Polyline::FirstPoint |
|
9 |
%class PolylineCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.PolylineCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Polyline |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
FirstPoint |
|
20 |
|
|
21 |
Entry { |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_first_point")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
} |
|
26 |
Exit{ |
|
27 |
} |
|
28 |
|
|
29 |
{ |
|
30 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
31 |
[ctxt.isPolygonLayer()] |
|
32 |
NextPointOrArcOrClose{ |
|
33 |
setQuestion( |
|
34 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
35 |
PluginServices.getText(this,"arc")+ |
|
36 |
"["+PluginServices.getText(this,"PolylineCADTool.arc")+"], "+ |
|
37 |
PluginServices.getText(this,"cad.or")+" "+ |
|
38 |
PluginServices.getText(this,"end")+ |
|
39 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
40 |
setDescription(new String[]{"inter_arc","terminate","cancel"}); |
|
41 |
addPoint( pointX,pointY,event); |
|
42 |
} |
|
43 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
44 |
NextPointOrArcOrClose{ |
|
45 |
setQuestion( |
|
46 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
47 |
PluginServices.getText(this,"arc")+ |
|
48 |
"["+PluginServices.getText(this,"PolylineCADTool.arc")+"], "+ |
|
49 |
PluginServices.getText(this,"close_polyline")+ |
|
50 |
"["+PluginServices.getText(this,"PolylineCADTool.close_polyline")+"], "+ |
|
51 |
PluginServices.getText(this,"cad.or")+" "+ |
|
52 |
PluginServices.getText(this,"end")+ |
|
53 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
54 |
setDescription(new String[]{"inter_arc","close_polyline","terminate","cancel"}); |
|
55 |
addPoint( pointX,pointY,event); |
|
56 |
} |
|
57 |
} |
|
58 |
NextPointOrArcOrClose{ |
|
59 |
addOption(s:String) |
|
60 |
[ctxt.isPolygonLayer() && (s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.arc")) || s.equals(PluginServices.getText(this,"inter_arc")))] |
|
61 |
NextPointOrLineOrClose { |
|
62 |
setQuestion( |
|
63 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
64 |
PluginServices.getText(this,"line")+ |
|
65 |
"["+PluginServices.getText(this,"PolylineCADTool.line")+"], "+ |
|
66 |
PluginServices.getText(this,"cad.or")+" "+ |
|
67 |
PluginServices.getText(this,"end")+ |
|
68 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
69 |
setDescription(new String[]{"inter_line","terminate","cancel"}); |
|
70 |
addOption(s); |
|
71 |
} |
|
72 |
addOption(s:String) |
|
73 |
[s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.arc")) || s.equals(PluginServices.getText(this,"inter_arc"))] |
|
74 |
NextPointOrLineOrClose { |
|
75 |
setQuestion( |
|
76 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
77 |
PluginServices.getText(this,"line")+ |
|
78 |
"["+PluginServices.getText(this,"PolylineCADTool.line")+"], "+ |
|
79 |
PluginServices.getText(this,"close_polyline")+ |
|
80 |
"["+PluginServices.getText(this,"PolylineCADTool.close_polyline")+"], "+ |
|
81 |
PluginServices.getText(this,"cad.or")+" "+ |
|
82 |
PluginServices.getText(this,"end")+ |
|
83 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
84 |
setDescription(new String[]{"inter_line","close_polyline","terminate","cancel"}); |
|
85 |
addOption(s); |
|
86 |
} |
|
87 |
addOption(s:String) |
|
88 |
[s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.close_polyline")) || s.equals(PluginServices.getText(this,"close_polyline"))] |
|
89 |
FirstPoint { |
|
90 |
addOption(s); |
|
91 |
closeGeometry(); |
|
92 |
endGeometry(); |
|
93 |
end(); |
|
94 |
} |
|
95 |
addOption(s:String) |
|
96 |
[(s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.end")) || s.equals(PluginServices.getText(this,"terminate"))) && ctxt.getLinesCount()!=0 ] |
|
97 |
FirstPoint { |
|
98 |
addOption(s); |
|
99 |
endGeometry(); |
|
100 |
end(); |
|
101 |
} |
|
102 |
addOption(s:String) |
|
103 |
[!s.equals(PluginServices.getText(this,"cancel"))] |
|
104 |
NextPointOrArcOrClose { |
|
105 |
} |
|
106 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
107 |
[ctxt.isPolygonLayer()] |
|
108 |
NextPointOrArcOrClose { |
|
109 |
setQuestion( |
|
110 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
111 |
PluginServices.getText(this,"arc")+ |
|
112 |
"["+PluginServices.getText(this,"PolylineCADTool.arc")+"], "+ |
|
113 |
PluginServices.getText(this,"cad.or")+" "+ |
|
114 |
PluginServices.getText(this,"end")+ |
|
115 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
116 |
setDescription(new String[]{"inter_arc","terminate","cancel"}); |
|
117 |
addPoint( pointX,pointY,event); |
|
118 |
} |
|
119 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
120 |
NextPointOrArcOrClose { |
|
121 |
setQuestion( |
|
122 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
123 |
PluginServices.getText(this,"arc")+ |
|
124 |
"["+PluginServices.getText(this,"PolylineCADTool.arc")+"], "+ |
|
125 |
PluginServices.getText(this,"close_polyline")+ |
|
126 |
"["+PluginServices.getText(this,"PolylineCADTool.close_polyline")+"], "+ |
|
127 |
PluginServices.getText(this,"cad.or")+" "+ |
|
128 |
PluginServices.getText(this,"end")+ |
|
129 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
130 |
setDescription(new String[]{"inter_arc","close_polyline","terminate","cancel"}); |
|
131 |
addPoint( pointX,pointY,event); |
|
132 |
} |
|
133 |
} |
|
134 |
NextPointOrLineOrClose{ |
|
135 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
136 |
[ctxt.isPolygonLayer()] |
|
137 |
NextPointOrLineOrClose { |
|
138 |
setQuestion( |
|
139 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
140 |
PluginServices.getText(this,"line")+ |
|
141 |
"["+PluginServices.getText(this,"PolylineCADTool.line")+"], "+ |
|
142 |
PluginServices.getText(this,"cad.or")+" "+ |
|
143 |
PluginServices.getText(this,"end")+ |
|
144 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
145 |
setDescription(new String[]{"inter_line","terminate","cancel"}); |
|
146 |
addPoint( pointX,pointY,event); |
|
147 |
} |
|
148 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
149 |
NextPointOrLineOrClose { |
|
150 |
setQuestion( |
|
151 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
152 |
PluginServices.getText(this,"line")+ |
|
153 |
"["+PluginServices.getText(this,"PolylineCADTool.line")+"], "+ |
|
154 |
PluginServices.getText(this,"close_polyline")+ |
|
155 |
"["+PluginServices.getText(this,"PolylineCADTool.close_polyline")+"], "+ |
|
156 |
PluginServices.getText(this,"cad.or")+" "+ |
|
157 |
PluginServices.getText(this,"end")+ |
|
158 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
159 |
setDescription(new String[]{"inter_line","close_polyline","terminate","cancel"}); |
|
160 |
addPoint( pointX,pointY,event); |
|
161 |
} |
|
162 |
addOption(s:String) |
|
163 |
[ctxt.isPolygonLayer() && (s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.line")) || s.equals(PluginServices.getText(this,"inter_line")))] |
|
164 |
NextPointOrArcOrClose { |
|
165 |
setQuestion( |
|
166 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
167 |
PluginServices.getText(this,"arc")+ |
|
168 |
"["+PluginServices.getText(this,"PolylineCADTool.arc")+"], "+ |
|
169 |
PluginServices.getText(this,"cad.or")+" "+ |
|
170 |
PluginServices.getText(this,"end")+ |
|
171 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
172 |
setDescription(new String[]{"inter_arc","terminate","cancel"}); |
|
173 |
addOption(s); |
|
174 |
} |
|
175 |
addOption(s:String) |
|
176 |
[s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.line")) || s.equals(PluginServices.getText(this,"inter_line"))] |
|
177 |
NextPointOrArcOrClose { |
|
178 |
setQuestion( |
|
179 |
PluginServices.getText(this,"insert_next_point")+", "+ |
|
180 |
PluginServices.getText(this,"arc")+ |
|
181 |
"["+PluginServices.getText(this,"PolylineCADTool.arc")+"], "+ |
|
182 |
PluginServices.getText(this,"close_polyline")+ |
|
183 |
"["+PluginServices.getText(this,"PolylineCADTool.close_polyline")+"], "+ |
|
184 |
PluginServices.getText(this,"cad.or")+" "+ |
|
185 |
PluginServices.getText(this,"end")+ |
|
186 |
"["+PluginServices.getText(this,"PolylineCADTool.end")+"]"); |
|
187 |
setDescription(new String[]{"inter_arc","close_polyline","terminate","cancel"}); |
|
188 |
addOption(s); |
|
189 |
} |
|
190 |
addOption(s:String) |
|
191 |
[s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.close_polyline")) || s.equals(PluginServices.getText(this,"close_polyline"))] |
|
192 |
FirstPoint { |
|
193 |
addOption(s); |
|
194 |
closeGeometry(); |
|
195 |
endGeometry(); |
|
196 |
end(); |
|
197 |
} |
|
198 |
addOption(s:String) |
|
199 |
[(s.equalsIgnoreCase(PluginServices.getText(this,"PolylineCADTool.end")) || s.equals(PluginServices.getText(this,"terminate"))) && ctxt.getLinesCount()!=0] |
|
200 |
FirstPoint { |
|
201 |
addOption(s); |
|
202 |
endGeometry(); |
|
203 |
end(); |
|
204 |
} |
|
205 |
addOption(s:String) |
|
206 |
[!s.equals(PluginServices.getText(this,"cancel"))] |
|
207 |
NextPointOrLineOrClose { |
|
208 |
} |
|
209 |
} |
|
210 |
|
|
211 |
Default |
|
212 |
{ |
|
213 |
addOption(s:String) |
|
214 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
215 |
FirstPoint{ |
|
216 |
cancel(); |
|
217 |
} |
|
218 |
addOption(s:String) |
|
219 |
[s.equals("")] |
|
220 |
FirstPoint{ |
|
221 |
endGeometry(); |
|
222 |
} |
|
223 |
addOption(s:String) |
|
224 |
FirstPoint{ |
|
225 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
226 |
} |
|
227 |
addValue(d:double) |
|
228 |
FirstPoint{ |
|
229 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
230 |
} |
|
231 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
232 |
FirstPoint{ |
|
233 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
234 |
} |
|
235 |
endPoint(pointX:double,pointY:double,event:InputEvent) |
|
236 |
FirstPoint{ |
|
237 |
addPoint( pointX,pointY,event); |
|
238 |
endGeometry(); |
|
239 |
} |
|
240 |
|
|
241 |
} |
|
242 |
%% |
|
0 | 243 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/EllipseCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Ellipse::FirstPointAxis |
|
9 |
%class EllipseCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.EllipseCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Ellipse |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
FirstPointAxis |
|
20 |
|
|
21 |
Entry { |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_initial_point_axis")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
} |
|
26 |
Exit{ |
|
27 |
} |
|
28 |
|
|
29 |
{ |
|
30 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
31 |
SecondPointAxis { |
|
32 |
setQuestion(PluginServices.getText(this,"insert_last_point_axis")); |
|
33 |
setDescription(new String[]{"cancel"}); |
|
34 |
addPoint( pointX,pointY,event); |
|
35 |
} |
|
36 |
|
|
37 |
} |
|
38 |
SecondPointAxis{ |
|
39 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
40 |
DistanceOtherAxis { |
|
41 |
setQuestion(PluginServices.getText(this,"insert_distance_another_axis")); |
|
42 |
setDescription(new String[]{"cancel"}); |
|
43 |
addPoint( pointX,pointY,event); |
|
44 |
} |
|
45 |
|
|
46 |
} |
|
47 |
DistanceOtherAxis{ |
|
48 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
49 |
FirstPointAxis { |
|
50 |
addPoint( pointX,pointY,event); |
|
51 |
} |
|
52 |
addValue( d:double) |
|
53 |
FirstPointAxis { |
|
54 |
addValue( d); |
|
55 |
} |
|
56 |
} |
|
57 |
|
|
58 |
Default |
|
59 |
{ |
|
60 |
addOption(s:String) |
|
61 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
62 |
FirstPointAxis{ |
|
63 |
end(); |
|
64 |
} |
|
65 |
addOption(s:String) |
|
66 |
FirstPointAxis{ |
|
67 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
68 |
} |
|
69 |
addValue(d:double) |
|
70 |
FirstPointAxis{ |
|
71 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
72 |
} |
|
73 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
74 |
FirstPointAxis{ |
|
75 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
76 |
} |
|
77 |
} |
|
78 |
%% |
|
0 | 79 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/RotateCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Rotate::PointMain |
|
9 |
%class RotateCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.RotateCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Rotate |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
PointMain |
|
20 |
Entry { |
|
21 |
selection(); |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_basis_point")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
|
|
26 |
} |
|
27 |
Exit{ |
|
28 |
} |
|
29 |
|
|
30 |
{ |
|
31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
32 |
AngleOrPoint { |
|
33 |
setQuestion(PluginServices.getText(this,"insert_rotation_angle")); |
|
34 |
setDescription(new String[]{"cancel"}); |
|
35 |
addPoint( pointX,pointY,event); |
|
36 |
} |
|
37 |
} |
|
38 |
AngleOrPoint{ |
|
39 |
addValue(d:double) |
|
40 |
PointMain{ |
|
41 |
setDescription(new String[]{"cancel"}); |
|
42 |
addValue(d); |
|
43 |
end(); |
|
44 |
refresh(); |
|
45 |
} |
|
46 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
47 |
PointMain { |
|
48 |
setDescription(new String[]{"cancel"}); |
|
49 |
addPoint( pointX,pointY,event); |
|
50 |
end(); |
|
51 |
refresh(); |
|
52 |
} |
|
53 |
} |
|
54 |
|
|
55 |
Default |
|
56 |
{ |
|
57 |
addOption(s:String) |
|
58 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
59 |
PointMain{ |
|
60 |
end(); |
|
61 |
} |
|
62 |
addOption(s:String) |
|
63 |
PointMain{ |
|
64 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
65 |
} |
|
66 |
addValue(d:double) |
|
67 |
PointMain{ |
|
68 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
69 |
} |
|
70 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
71 |
PointMain{ |
|
72 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
73 |
} |
|
74 |
} |
|
75 |
%% |
|
0 | 76 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/JoinCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Join::Execute |
|
9 |
%class JoinCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.JoinCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Join |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
Execute |
|
20 |
Entry { |
|
21 |
join(); |
|
22 |
end(); |
|
23 |
} |
|
24 |
Exit{ |
|
25 |
} |
|
26 |
|
|
27 |
{ |
|
28 |
} |
|
29 |
|
|
30 |
Default |
|
31 |
{ |
|
32 |
addOption(s:String) |
|
33 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
34 |
Execute{ |
|
35 |
end(); |
|
36 |
} |
|
37 |
addOption(s:String) |
|
38 |
Execute{ |
|
39 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
40 |
} |
|
41 |
addValue(d:double) |
|
42 |
Execute{ |
|
43 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
44 |
} |
|
45 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
46 |
Execute{ |
|
47 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
48 |
} |
|
49 |
} |
|
50 |
%% |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/CircleCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Circle::CenterPointOr3p |
|
9 |
%class CircleCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.CircleCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Circle |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
CenterPointOr3p |
|
20 |
|
|
21 |
Entry { |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_central_point_or_3p")+ |
|
24 |
"["+PluginServices.getText(this,"CircleCADTool.3p")+"]"); |
|
25 |
setDescription(new String[]{"cancel","3P"}); |
|
26 |
} |
|
27 |
Exit{ |
|
28 |
} |
|
29 |
|
|
30 |
{ |
|
31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
32 |
PointOrRadius { |
|
33 |
setQuestion(PluginServices.getText(this,"insert_radius_or_second_point")); |
|
34 |
setDescription(new String[]{"cancel"}); |
|
35 |
addPoint( pointX,pointY,event); |
|
36 |
} |
|
37 |
addOption( s:String) |
|
38 |
[s.equalsIgnoreCase(PluginServices.getText(this,"CircleCADTool.3p"))] |
|
39 |
FirstPoint{ |
|
40 |
setQuestion(PluginServices.getText(this,"insert_first_point")); |
|
41 |
setDescription(new String[]{"cancel"}); |
|
42 |
addOption( s); |
|
43 |
} |
|
44 |
} |
|
45 |
PointOrRadius{ |
|
46 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
47 |
CenterPointOr3p { |
|
48 |
addPoint( pointX,pointY,event); |
|
49 |
} |
|
50 |
addValue( d:double) |
|
51 |
CenterPointOr3p { |
|
52 |
addValue( d); |
|
53 |
} |
|
54 |
} |
|
55 |
SecondPoint{ |
|
56 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
57 |
ThirdPoint { |
|
58 |
setQuestion(PluginServices.getText(this,"insert_third_point")); |
|
59 |
setDescription(new String[]{"cancel"}); |
|
60 |
addPoint( pointX,pointY,event); |
|
61 |
} |
|
62 |
} |
|
63 |
ThirdPoint{ |
|
64 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
65 |
CenterPointOr3p { |
|
66 |
addPoint( pointX,pointY,event); |
|
67 |
} |
|
68 |
} |
|
69 |
|
|
70 |
FirstPoint{ |
|
71 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
72 |
SecondPoint { |
|
73 |
setQuestion(PluginServices.getText(this,"insert_second_point")); |
|
74 |
setDescription(new String[]{"cancel"}); |
|
75 |
addPoint( pointX,pointY,event); |
|
76 |
} |
|
77 |
} |
|
78 |
|
|
79 |
Default |
|
80 |
{ |
|
81 |
addOption(s:String) |
|
82 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
83 |
CenterPointOr3p{ |
|
84 |
end(); |
|
85 |
} |
|
86 |
addOption(s:String) |
|
87 |
CenterPointOr3p{ |
|
88 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
89 |
} |
|
90 |
addValue(d:double) |
|
91 |
CenterPointOr3p{ |
|
92 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
93 |
} |
|
94 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
95 |
CenterPointOr3p{ |
|
96 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
97 |
} |
|
98 |
} |
|
99 |
%% |
|
0 | 100 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/smc.bat | ||
---|---|---|
1 |
java -jar ../lib/Smc.jar -d ../src/gen -java *.sm |
|
0 | 2 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/MultiPointCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start MultiPoint::InsertPoint |
|
9 |
%class MultiPointCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.MultiPointCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
|
|
16 |
%map MultiPoint |
|
17 |
%% |
|
18 |
// A task begins life in suspended animation. |
|
19 |
|
|
20 |
InsertPoint |
|
21 |
|
|
22 |
Entry { |
|
23 |
setQuestion( |
|
24 |
PluginServices.getText(this,"insert_point")); |
|
25 |
setDescription(new String[]{"cancel",}); |
|
26 |
} |
|
27 |
Exit { |
|
28 |
} |
|
29 |
|
|
30 |
{ |
|
31 |
|
|
32 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
33 |
InsertPoint { |
|
34 |
setQuestion( |
|
35 |
PluginServices.getText(this,"insert_point")+" "+ |
|
36 |
PluginServices.getText(this,"cad.or")+" "+ |
|
37 |
PluginServices.getText(this,"end")+ |
|
38 |
"["+PluginServices.getText(this,"MultipointCADTool.end")+"]"); |
|
39 |
|
|
40 |
setDescription(new String[]{"cancel","end"}); |
|
41 |
addPoint( pointX,pointY,event); |
|
42 |
} |
|
43 |
addOption( s:String) |
|
44 |
[s.equalsIgnoreCase(PluginServices.getText(this,"MultipointCADTool.end")) || s.equals(PluginServices.getText(this,"end"))] |
|
45 |
InsertPoint { |
|
46 |
setQuestion(PluginServices.getText(this,"insert_point")); |
|
47 |
setDescription(new String[]{"cancel"}); |
|
48 |
addOption(s); |
|
49 |
endGeometry(); |
|
50 |
} |
|
51 |
} |
|
52 |
|
|
53 |
Default |
|
54 |
{ |
|
55 |
addOption(s:String) |
|
56 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
57 |
InsertPoint{ |
|
58 |
end(); |
|
59 |
} |
|
60 |
addOption(s:String) |
|
61 |
InsertPoint{ |
|
62 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
63 |
} |
|
64 |
addValue(d:double) |
|
65 |
InsertPoint{ |
|
66 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
67 |
} |
|
68 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
69 |
InsertPoint{ |
|
70 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
71 |
} |
|
72 |
} |
|
73 |
%% |
|
0 | 74 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/MatrixCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Matrix::Start |
|
9 |
%class MatrixCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.MatrixCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Matrix |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
Start |
|
20 |
Entry { |
|
21 |
selection(); |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_first_point")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
|
|
26 |
} |
|
27 |
Exit{ |
|
28 |
} |
|
29 |
|
|
30 |
{ |
|
31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
32 |
SecondPoint { |
|
33 |
setQuestion(PluginServices.getText(this,"insert_second_point")); |
|
34 |
setDescription(new String[]{"cancel"}); |
|
35 |
addPoint( pointX,pointY,event); |
|
36 |
} |
|
37 |
|
|
38 |
} |
|
39 |
|
|
40 |
FirstPoint{ |
|
41 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
42 |
SecondPoint { |
|
43 |
setDescription(new String[]{"cancel"}); |
|
44 |
addPoint( pointX,pointY,event); |
|
45 |
} |
|
46 |
} |
|
47 |
SecondPoint{ |
|
48 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
49 |
FirstPoint { |
|
50 |
setDescription(new String[]{"cancel"}); |
|
51 |
addPoint( pointX,pointY,event); |
|
52 |
endMatrix(); |
|
53 |
} |
|
54 |
} |
|
55 |
|
|
56 |
Default |
|
57 |
{ |
|
58 |
addOption(s:String) |
|
59 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
60 |
Start{ |
|
61 |
end(); |
|
62 |
} |
|
63 |
addOption(s:String) |
|
64 |
Start{ |
|
65 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
66 |
} |
|
67 |
addValue(d:double) |
|
68 |
Start{ |
|
69 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
70 |
} |
|
71 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
72 |
Start{ |
|
73 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
74 |
} |
|
75 |
} |
|
76 |
%% |
|
0 | 77 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/RectangleCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Rectangle::FirstPoint |
|
9 |
%class RectangleCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.RectangleCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Rectangle |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
FirstPoint |
|
20 |
|
|
21 |
Entry { |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_first_point_corner")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
} |
|
26 |
Exit{ |
|
27 |
} |
|
28 |
|
|
29 |
{ |
|
30 |
|
|
31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
32 |
SecondPointOrSquare { |
|
33 |
setQuestion( |
|
34 |
PluginServices.getText(this,"insert_point_corner")+" "+ |
|
35 |
PluginServices.getText(this,"cad.or")+" "+ |
|
36 |
PluginServices.getText(this,"square")+" "+ |
|
37 |
"["+PluginServices.getText(this,"RectangleCADTool.square")+"]"); |
|
38 |
setDescription(new String[]{"square","cancel"}); |
|
39 |
addPoint( pointX,pointY,event); |
|
40 |
} |
|
41 |
|
|
42 |
} |
|
43 |
SecondPointOrSquare{ |
|
44 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
45 |
FirstPoint { |
|
46 |
addPoint(pointX,pointY,event); |
|
47 |
} |
|
48 |
addOption(s:String) |
|
49 |
[s.equalsIgnoreCase(PluginServices.getText(this,"RectangleCADTool.square")) || s.equals(PluginServices.getText(this,"square"))] |
|
50 |
SecondPointSquare { |
|
51 |
setQuestion(PluginServices.getText(this,"insert_opposited_corner")); |
|
52 |
setDescription(new String[]{"cancel"}); |
|
53 |
addOption(s); |
|
54 |
} |
|
55 |
|
|
56 |
} |
|
57 |
SecondPointSquare{ |
|
58 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
59 |
FirstPoint { |
|
60 |
addPoint( pointX,pointY,event); |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 |
Default |
|
65 |
{ |
|
66 |
addOption(s:String) |
|
67 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
68 |
FirstPoint{ |
|
69 |
end(); |
|
70 |
} |
|
71 |
addOption(s:String) |
|
72 |
FirstPoint{ |
|
73 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
74 |
} |
|
75 |
addValue(d:double) |
|
76 |
FirstPoint{ |
|
77 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
78 |
} |
|
79 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
80 |
FirstPoint{ |
|
81 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
82 |
} |
|
83 |
} |
|
84 |
%% |
|
0 | 85 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/ArcCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Arc::FirstPoint |
|
9 |
%class ArcCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.ArcCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Arc |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
FirstPoint |
|
20 |
|
|
21 |
Entry { |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_first_point")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
} |
|
26 |
Exit{ |
|
27 |
} |
|
28 |
|
|
29 |
{ |
|
30 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
31 |
SecondPoint { |
|
32 |
setQuestion(PluginServices.getText(this,"insert_second_point")); |
|
33 |
setDescription(new String[]{"cancel"}); |
|
34 |
addPoint( pointX,pointY,event); |
|
35 |
} |
|
36 |
|
|
37 |
} |
|
38 |
SecondPoint{ |
|
39 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
40 |
ThirdPoint { |
|
41 |
setQuestion(PluginServices.getText(this,"insert_last_point")); |
|
42 |
setDescription(new String[]{"cancel"}); |
|
43 |
addPoint( pointX,pointY,event); |
|
44 |
} |
|
45 |
} |
|
46 |
ThirdPoint{ |
|
47 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
48 |
FirstPoint { |
|
49 |
addPoint( pointX,pointY,event); |
|
50 |
} |
|
51 |
} |
|
52 |
|
|
53 |
Default |
|
54 |
{ |
|
55 |
addOption(s:String) |
|
56 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
57 |
FirstPoint{ |
|
58 |
end(); |
|
59 |
} |
|
60 |
addOption(s:String) |
|
61 |
FirstPoint{ |
|
62 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
63 |
} |
|
64 |
addValue(d:double) |
|
65 |
FirstPoint{ |
|
66 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
67 |
} |
|
68 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
69 |
FirstPoint{ |
|
70 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
71 |
} |
|
72 |
} |
|
73 |
%% |
|
0 | 74 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/MoveCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Move::FirstPointToMove |
|
9 |
%class MoveCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.MoveCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Move |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
FirstPointToMove |
|
20 |
Entry { |
|
21 |
selection(); |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_point_move")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
|
|
26 |
} |
|
27 |
Exit{ |
|
28 |
} |
|
29 |
|
|
30 |
{ |
|
31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
32 |
SecondPointToMove { |
|
33 |
setQuestion(PluginServices.getText(this,"insert_second_point_move")); |
|
34 |
setDescription(new String[]{"cancel"}); |
|
35 |
addPoint( pointX,pointY,event); |
|
36 |
} |
|
37 |
} |
|
38 |
SecondPointToMove{ |
|
39 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
40 |
FirstPointToMove { |
|
41 |
setDescription(new String[]{"cancel"}); |
|
42 |
addPoint( pointX,pointY,event); |
|
43 |
end(); |
|
44 |
refresh(); |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
48 |
Default |
|
49 |
{ |
|
50 |
addOption(s:String) |
|
51 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
52 |
FirstPointToMove{ |
|
53 |
end(); |
|
54 |
} |
|
55 |
addOption(s:String) |
|
56 |
FirstPointToMove{ |
|
57 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
58 |
} |
|
59 |
addValue(d:double) |
|
60 |
FirstPointToMove{ |
|
61 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
62 |
} |
|
63 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
64 |
FirstPointToMove{ |
|
65 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
66 |
} |
|
67 |
} |
|
68 |
%% |
|
0 | 69 |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/SplitGeometryCADTool.sm | ||
---|---|---|
1 |
%{ |
|
2 |
/** |
|
3 |
Finite state machine, generated with fsm tool |
|
4 |
(http://smc.sourceforge.net) |
|
5 |
@author Alvaro Zabala |
|
6 |
*/ |
|
7 |
%} |
|
8 |
|
|
9 |
%start SplitGeometry::FirstPoint |
|
10 |
%class SplitGeometryCADTool |
|
11 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
12 |
%import com.iver.cit.gvsig.gui.cad.tools.SplitGeometryCADTool |
|
13 |
%import java.awt.event.InputEvent |
|
14 |
%import com.iver.andami.PluginServices |
|
15 |
|
|
16 |
|
|
17 |
%map SplitGeometry |
|
18 |
%% |
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
FirstPoint |
|
23 |
|
|
24 |
Entry { |
|
25 |
setQuestion(PluginServices.getText(this,"insert_first_point")); |
|
26 |
setDescription(new String[]{"cancel"}); |
|
27 |
} |
|
28 |
|
|
29 |
Exit{} |
|
30 |
|
|
31 |
{ |
|
32 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
33 |
DigitizingLine{ |
|
34 |
setQuestion(PluginServices.getText(this,"insert_more_points_or_finish")); |
|
35 |
setDescription(new String[]{"cancel"}); |
|
36 |
addPoint( pointX,pointY,event); |
|
37 |
} |
|
38 |
} |
|
39 |
|
|
40 |
|
|
41 |
DigitizingLine{ |
|
42 |
/** |
|
43 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
44 |
[ctxt.isDigitingFinished()] |
|
45 |
FirstPoint{ |
|
46 |
finishDigitizedLine(); |
|
47 |
splitSelectedGeometryWithDigitizedLine(); |
|
48 |
end(); |
|
49 |
} |
|
50 |
*/ |
|
51 |
|
|
52 |
addOption(s:String) |
|
53 |
[s.equalsIgnoreCase(PluginServices.getText(this,"SplitGeometryCADTool.end")) || s.equalsIgnoreCase(PluginServices.getText(this,"terminate"))] |
|
54 |
FirstPoint { |
|
55 |
finishDigitizedLine(); |
|
56 |
splitSelectedGeometryWithDigitizedLine(); |
|
57 |
end(); |
|
58 |
} |
|
59 |
|
|
60 |
|
|
61 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
62 |
DigitizingLine{ |
|
63 |
setQuestion( |
|
64 |
PluginServices.getText(this,"insert_next_point")+ |
|
65 |
PluginServices.getText(this,"cad.or")+" "+ |
|
66 |
PluginServices.getText(this,"end")+ |
|
67 |
"["+PluginServices.getText(this,"SplitGeometryCADTool.end")+"]" |
|
68 |
); |
|
69 |
setDescription(new String[]{"inter_arc","terminate","cancel"}); |
|
70 |
addPoint( pointX,pointY,event); |
|
71 |
} |
|
72 |
} |
|
73 |
|
|
74 |
Default{ |
|
75 |
|
|
76 |
addOption(s:String) |
|
77 |
[s.equals("")] |
|
78 |
FirstPoint{ |
|
79 |
restorePreviousTool(); |
|
80 |
setQuestion(PluginServices.getText(this,"insert_first_point")); |
|
81 |
setDescription(new String[]{"cancel"}); |
|
82 |
end(); |
|
83 |
} |
|
84 |
|
|
85 |
addOption(s:String) |
|
86 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
87 |
FirstPoint{ |
|
88 |
end(); |
|
89 |
} |
|
90 |
|
|
91 |
addOption(s:String) |
|
92 |
FirstPoint{ |
|
93 |
throwOptionException(PluginServices.getText(this,"incorrect_option"),s); |
|
94 |
} |
|
95 |
|
|
96 |
addValue(d:double) |
|
97 |
FirstPoint{ |
|
98 |
throwValueException(PluginServices.getText(this,"incorrect_value"),d); |
|
99 |
} |
|
100 |
|
|
101 |
addPoint(pointX:double,pointY:double,event:InputEvent) |
|
102 |
FirstPoint{ |
|
103 |
throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); |
|
104 |
} |
|
105 |
} |
|
106 |
%% |
tags/v2_0_0_Build_2059/extensions/extEditing/sm/CopyCADTool.sm | ||
---|---|---|
1 |
// -*- tab-width: 4; -*- |
|
2 |
|
|
3 |
%{ |
|
4 |
// |
|
5 |
// Vicente Caballero Navarro |
|
6 |
%} |
|
7 |
|
|
8 |
%start Copy::FirstPointToMove |
|
9 |
%class CopyCADTool |
|
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
|
11 |
%import com.iver.cit.gvsig.gui.cad.tools.CopyCADTool |
|
12 |
%import java.awt.event.InputEvent |
|
13 |
%import com.iver.andami.PluginServices |
|
14 |
|
|
15 |
%map Copy |
|
16 |
%% |
|
17 |
// A task begins life in suspended animation. |
|
18 |
|
|
19 |
FirstPointToMove |
|
20 |
Entry { |
|
21 |
selection(); |
|
22 |
setQuestion( |
|
23 |
PluginServices.getText(this,"insert_point_move")); |
|
24 |
setDescription(new String[]{"cancel"}); |
|
25 |
|
|
26 |
} |
|
27 |
Exit{ |
|
28 |
} |
|
29 |
|
|
30 |
{ |
|
31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
32 |
SecondPointToMove { |
|
33 |
setQuestion(PluginServices.getText(this,"insert_second_point_move")); |
|
34 |
setDescription(new String[]{"cancel"}); |
|
35 |
addPoint( pointX,pointY,event); |
|
36 |
} |
|
37 |
} |
|
38 |
SecondPointToMove{ |
|
39 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
|
40 |
FirstPointToMove { |
|
41 |
setDescription(new String[]{"cancel"}); |
|
42 |
addPoint( pointX,pointY,event); |
|
43 |
end(); |
|
44 |
refresh(); |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
48 |
Default |
|
49 |
{ |
|
50 |
addOption(s:String) |
|
51 |
[s.equals(PluginServices.getText(this,"cancel"))] |
|
52 |
FirstPointToMove{ |
Also available in: Unified diff