Revision 4583 trunk/extensions/extCAD/sm/RectangleCADTool.sm
RectangleCADTool.sm | ||
---|---|---|
10 | 10 |
%package com.iver.cit.gvsig.gui.cad.tools.smc |
11 | 11 |
%import com.iver.cit.gvsig.gui.cad.tools.RectangleCADTool |
12 | 12 |
%import java.awt.event.InputEvent |
13 |
%import com.iver.andami.PluginServices |
|
13 | 14 |
|
14 | 15 |
%map Rectangle |
15 | 16 |
%% |
... | ... | |
18 | 19 |
FirstPoint |
19 | 20 |
|
20 | 21 |
Entry { |
21 |
setQuestion("RECTANGULO" + "\n" +
|
|
22 |
"Insertar primer punto de esquina");
|
|
23 |
setDescription(new String[]{"Cancelar"});
|
|
22 |
setQuestion(ctxt.getName() + "\n" +
|
|
23 |
PluginServices.getText(this,"insert_first_point_corner"));
|
|
24 |
setDescription(new String[]{"cancel"});
|
|
24 | 25 |
} |
25 | 26 |
Exit{ |
26 | 27 |
} |
... | ... | |
29 | 30 |
|
30 | 31 |
addPoint( pointX:double,pointY:double,event:InputEvent) |
31 | 32 |
SecondPointOrSquare { |
32 |
setQuestion("Insertar punto de esquina opuesta o Cuadrado[C]");
|
|
33 |
setDescription(new String[]{"Cuadrado","Cancelar"});
|
|
33 |
setQuestion(PluginServices.getText(this,"insert_point_corner_or_square"));
|
|
34 |
setDescription(new String[]{"square","cancel"});
|
|
34 | 35 |
addPoint( pointX,pointY,event); |
35 | 36 |
} |
36 | 37 |
|
... | ... | |
42 | 43 |
end(); |
43 | 44 |
} |
44 | 45 |
addOption(s:String) |
45 |
[s.equals("c") || s.equals("C") || s.equals("Cuadrado")]
|
|
46 |
[s.equals("c") || s.equals("C") || s.equals(PluginServices.getText(this,"square"))]
|
|
46 | 47 |
SecondPointSquare { |
47 |
setQuestion("Insertar esquina opuesta");
|
|
48 |
setDescription(new String[]{"Cancelar"});
|
|
48 |
setQuestion(PluginServices.getText(this,"insert_opposited_corner"));
|
|
49 |
setDescription(new String[]{"cancel"});
|
|
49 | 50 |
addOption(s); |
50 | 51 |
} |
51 | 52 |
|
... | ... | |
61 | 62 |
Default |
62 | 63 |
{ |
63 | 64 |
addOption(s:String) |
64 |
[s.equals("Cancelar")]
|
|
65 |
[s.equals(PluginServices.getText(this,"cancel"))]
|
|
65 | 66 |
FirstPoint{ |
66 | 67 |
end(); |
67 | 68 |
} |
Also available in: Unified diff