svn-gvsig-desktop / tags / v1_0_2_RELEASE / extensions / extCAD / sm / ExploitCADTool.sm @ 40799
History | View | Annotate | Download (907 Bytes)
1 |
// -*- tab-width: 4; -*- |
---|---|
2 |
|
3 |
%{ |
4 |
// |
5 |
// Vicente Caballero Navarro |
6 |
%} |
7 |
|
8 |
%start Exploit::Execute |
9 |
%class ExploitCADTool |
10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
11 |
%import com.iver.cit.gvsig.gui.cad.tools.ExploitCADTool |
12 |
%import java.awt.event.InputEvent |
13 |
%import com.iver.andami.PluginServices |
14 |
|
15 |
%map Exploit |
16 |
%% |
17 |
// A task begins life in suspended animation. |
18 |
|
19 |
Execute |
20 |
Entry { |
21 |
exploit(); |
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 |
%% |