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