Statistics
| Revision:

root / trunk / extensions / extCAD / sm / LineCADTool.sm @ 3883

History | View | Annotate | Download (1.34 KB)

1
// -*- tab-width: 4; -*-
2

    
3
%{
4
//
5
// Vicente Caballero Navarro
6
%}
7

    
8
%start ExecuteMap::Initial
9
%class LineCADTool
10
%package com.iver.cit.gvsig.gui.cad.tools.smc
11
%import com.iver.cit.gvsig.gui.cad.tools.LineCADTool
12

    
13
%map ExecuteMap
14
%%
15
// A task begins life in suspended animation.
16

    
17
Initial
18

    
19
	Entry {
20
		setQuestion("LINEA" + "\n" +
21
		"Insertar primer punto");
22
		setDescription(new String[]{"Cancelar"});
23
		}
24
	Exit{
25
		}
26

    
27
	{
28

    
29
		addPoint( pointX:double,pointY:double)
30
			First {
31
				setQuestion("Insertar segundo punto o angulo");
32
				setDescription(new String[]{"Cancelar"});
33
				addPoint( pointX,pointY);
34
				}
35

    
36
	}
37
First{
38
	addPoint( pointX:double,pointY:double)
39
		First {
40
			setQuestion("Insertar segundo punto o angulo");
41
			setDescription(new String[]{"Cancelar"});
42
			addPoint( pointX,pointY);
43
			}
44
	addValue( d:double)
45
		Second {
46
			setQuestion("Insertar longitud o punto");
47
			setDescription(new String[]{"Cancelar"});
48
			addValue( d);
49
			}
50

    
51
}
52
Second{
53
	addPoint( pointX:double,pointY:double)
54
		First {
55
			setQuestion("Insertar segundo punto o angulo");
56
			setDescription(new String[]{"Cancelar"});
57
			addPoint( pointX,pointY);
58
			}
59
	addValue( d:double)
60
		First {
61
			setQuestion("Insertar segundo punto o angulo");
62
			setDescription(new String[]{"Cancelar"});
63
			addValue( d);
64
			}
65
	}
66
Default
67
{
68
	addOption(s:String)
69
		[s.equals("Cancelar")]
70
		Initial{
71
			end();
72
			}
73
}
74
%%