1 9 10 package org.enhydra.jawe.actions; 11 12 import org.jgraph.graph.*; 13 14 import org.enhydra.jawe.*; 15 import org.enhydra.jawe.graph.*; 16 import org.enhydra.jawe.xml.*; 17 import org.enhydra.jawe.xml.panels.*; 18 19 import java.awt.event.ActionEvent ; 20 import javax.swing.*; 21 import java.util.*; 22 import java.awt.*; 23 24 27 public class SetNoRouting extends ActionBase { 28 29 public SetNoRouting (ProcessEditor pe) { 30 super(pe); 31 } 32 33 public void actionPerformed(ActionEvent e) { 34 Object transition=editor.getGraph().getSelectionCell(); 35 if (transition instanceof Transition) { 36 Transition tr=(Transition)transition; 38 Map propertyMap = new HashMap(); 39 Map map = GraphConstants.cloneMap(tr.getAttributes()); 40 GraphConstants.setRouting(map,new NoRouting()); 41 propertyMap.put(tr,map); 42 String undoMsg=ResourceManager.getLanguageDependentString("MessageSettingTransitionTypeToNoRouting"); 43 ((JaWEGraphModel)editor.getGraph().getModel()).insertAndEdit(null,propertyMap,null,null,null,undoMsg); 44 } 45 } 46 } 47 | Popular Tags |