svn-gvsig-desktop / trunk / extensions / extCAD / sm / RectangleCADTool.sm @ 3844
History | View | Annotate | Download (906 Bytes)
1 |
// -*- tab-width: 4; -*- |
---|---|
2 |
|
3 |
%{ |
4 |
// |
5 |
// Vicente Caballero Navarro |
6 |
%} |
7 |
|
8 |
%start ExecuteMap::Initial |
9 |
%class RectangleCADTool |
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
11 |
%import com.iver.cit.gvsig.gui.cad.tools.RectangleCADTool |
12 |
|
13 |
%map ExecuteMap |
14 |
%% |
15 |
// A task begins life in suspended animation. |
16 |
|
17 |
Initial |
18 |
|
19 |
Entry { |
20 |
init(); |
21 |
setQuestion("RECTANGULO" + "\n" + |
22 |
"Insertar primer punto de esquina"); |
23 |
} |
24 |
Exit{ |
25 |
} |
26 |
|
27 |
{ |
28 |
|
29 |
addPoint(pointX:double,pointY:double) |
30 |
First { |
31 |
setQuestion("Insertar punto de esquina opuesta o Cuadrado[C]"); |
32 |
addPoint(pointX,pointY); |
33 |
} |
34 |
|
35 |
} |
36 |
First{ |
37 |
addPoint(pointX:double,pointY:double) |
38 |
Third { |
39 |
addPoint(pointX,pointY); |
40 |
end(); |
41 |
} |
42 |
addOption(s:String) |
43 |
Second { |
44 |
setQuestion("Insertar esquina opuesta"); |
45 |
addOption(s); |
46 |
} |
47 |
|
48 |
} |
49 |
Second{ |
50 |
addPoint(pointX:double,pointY:double) |
51 |
Fourth { |
52 |
addPoint(pointX,pointY); |
53 |
end(); |
54 |
} |
55 |
} |
56 |
Third{ |
57 |
} |
58 |
Fourth{ |
59 |
} |
60 |
Default |
61 |
{ |
62 |
|
63 |
} |
64 |
%% |