// -*- tab-width: 4; -*- %{ // // Vicente Caballero Navarro %} %start Symmetry::FirstPoint %class SymmetryCADTool %package com.iver.cit.gvsig.gui.cad.tools.smc %import com.iver.cit.gvsig.gui.cad.tools.SymmetryCADTool %import java.awt.event.InputEvent %import com.iver.andami.PluginServices %map Symmetry %% // A task begins life in suspended animation. FirstPoint Entry { selection(); setQuestion( PluginServices.getText(this,"insert_first_point")); setDescription(new String[]{"cancel"}); } Exit{ } { addPoint( pointX:double,pointY:double,event:InputEvent) SecondPoint { setQuestion(PluginServices.getText(this,"insert_second_point")); setDescription(new String[]{"cancel"}); addPoint( pointX,pointY,event); } } SecondPoint{ addPoint( pointX:double,pointY:double,event:InputEvent) CutOrCopy { setQuestion(PluginServices.getText(this,"suprimir_objetos_origen")); setDescription(new String[]{"cancel","cut","copy"}); addPoint( pointX,pointY,event); } } CutOrCopy{ addOption(s:String) FirstPoint{ setDescription(new String[]{"cancel"}); addOption(s); end(); } } 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); } } %%