// -*- tab-width: 4; -*- %{ // // Vicente Caballero Navarro %} %start Point::FirstPoint %class PointCADTool %package com.iver.cit.gvsig.gui.cad.tools.smc %import com.iver.cit.gvsig.gui.cad.tools.PointCADTool %import java.awt.event.InputEvent %import com.iver.andami.PluginServices %map Point %% // A task begins life in suspended animation. FirstPoint Entry { setQuestion( PluginServices.getText(this,"define_point")); setDescription(new String[]{"cancel"}); } Exit { } { addPoint( pointX:double,pointY:double,event:InputEvent) FirstPoint { setQuestion(PluginServices.getText(this,"insert_point")); setDescription(new String[]{"cancel"}); addPoint( pointX,pointY,event); } } Default { addOption(s:String) [s.equals(PluginServices.getText(this,"cancel"))] FirstPoint{ end(); } addOption(s:String) FirstPoint{ throwOptionException(PluginServices.getText(this,"incorrect_option"),s); } addValue(d:double) FirstPoint{ throwValueException(PluginServices.getText(this,"incorrect_value"),d); } addPoint(pointX:double,pointY:double,event:InputEvent) FirstPoint{ throwPointException(PluginServices.getText(this,"incorrect_point"),pointX,pointY); } } %%