svn-gvsig-desktop / trunk / extensions / extCAD / sm / CopyCADTool.sm @ 4578
History | View | Annotate | Download (1023 Bytes)
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 |
|
14 |
%map Copy |
15 |
%% |
16 |
// A task begins life in suspended animation. |
17 |
|
18 |
FirstPointToMove |
19 |
Entry { |
20 |
selection(); |
21 |
setQuestion("COPIAR" + "\n" + |
22 |
"Precisar punto de desplazamiento"); |
23 |
setDescription(new String[]{"Cancelar"}); |
24 |
|
25 |
} |
26 |
Exit{ |
27 |
} |
28 |
|
29 |
{ |
30 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
31 |
SecondPointToMove { |
32 |
setQuestion("Precisar segundo punto del desplazamiento"); |
33 |
setDescription(new String[]{"Cancelar"}); |
34 |
addPoint( pointX,pointY,event); |
35 |
} |
36 |
} |
37 |
SecondPointToMove{ |
38 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
39 |
FirstPointToMove { |
40 |
setDescription(new String[]{"Cancelar"}); |
41 |
addPoint( pointX,pointY,event); |
42 |
end(); |
43 |
refresh(); |
44 |
} |
45 |
} |
46 |
|
47 |
Default |
48 |
{ |
49 |
addOption(s:String) |
50 |
[s.equals("Cancelar")] |
51 |
FirstPointToMove{ |
52 |
end(); |
53 |
} |
54 |
} |
55 |
%% |