Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extCAD / sm / PointCADTool.sm @ 4892

History | View | Annotate | Download (836 Bytes)

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

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

    
8
%start Point::FirstPoint
9
%class PointCADTool
10
%package com.iver.cit.gvsig.gui.cad.tools.smc
11
%import com.iver.cit.gvsig.gui.cad.tools.PointCADTool
12
%import java.awt.event.InputEvent
13
%import com.iver.andami.PluginServices
14

    
15

    
16
%map Point
17
%%
18
// A task begins life in suspended animation.
19

    
20
FirstPoint
21

    
22
	Entry {
23
		setQuestion(
24
		PluginServices.getText(this,"define_point"));
25
		setDescription(new String[]{"cancel"});
26
		}
27
	Exit {
28
		}
29

    
30
	{
31

    
32
		addPoint( pointX:double,pointY:double,event:InputEvent)
33
			FirstPoint {
34
				setQuestion(PluginServices.getText(this,"insert_point"));
35
				setDescription(new String[]{"cancel"});
36
				addPoint( pointX,pointY,event);
37
				}
38
	}
39

    
40
Default
41
{
42
	addOption(s:String)
43
		[s.equals(PluginServices.getText(this,"cancel"))]
44
		FirstPoint{
45
			end();
46
			}
47
}
48
%%