Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extCAD / sm / ArcCADTool.sm @ 4583

History | View | Annotate | Download (1.21 KB)

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(ctxt.getName() + "\n"+
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
			end();
51
			}
52
}
53

    
54
Default
55
{
56
	addOption(s:String)
57
		[s.equals(PluginServices.getText(this,"cancel"))]
58
		FirstPoint{
59
			end();
60
			}
61
}
62
%%