1 9 10 package org.enhydra.jawe.actions; 11 12 import org.enhydra.jawe.*; 13 import org.enhydra.jawe.graph.*; 14 15 import java.awt.event.ActionEvent ; 16 17 import javax.swing.*; 18 import java.awt.*; 19 20 24 public class EditCell extends ActionBase { 25 26 public EditCell (AbstractEditor editor) { 27 super(editor); 28 } 29 30 public void actionPerformed(ActionEvent e) { 31 AbstractGraph graph=editor.getGraph(); 32 Object cell=graph.getSelectionCell(); 33 if(!graph.isCellEditable(cell)) return; 34 Window parentW=graph.getEditor().getWindow(); 35 if (cell instanceof org.enhydra.jawe.graph.Process) { 36 org.enhydra.jawe.graph.Process wf=(org.enhydra.jawe.graph.Process)cell; 37 if (wf.getImplementationEditor()!=null) { 39 AbstractEditor ae=wf.getImplementationEditor(); 40 ae.refreshEditorConfiguration(); 41 } 42 if (wf.getImplementationEditor()!=null && (wf.getImplementationEditor().getGraph().getXMLPackage()!= 43 JaWE.getInstance().getRealXMLPackage() || 44 wf.getImplementationEditor().getGraph().getXMLPackage().isReadOnly())) { 45 wf.getImplementationEditor().setButtonsEnabled(false); 46 } 47 wf.showProcess(parentW); 48 graph.repaint(); 49 } 50 if (cell instanceof Subflow) { 51 Subflow sf=(Subflow)cell; 52 sf.showSubflow(parentW,graph.getXMLPackage()); 53 } 55 if (cell instanceof BlockActivity) { 56 BlockActivity ba=(BlockActivity)cell; 57 if (ba.getImplementationEditor()!=null) { 58 AbstractEditor ae=ba.getImplementationEditor(); 59 ae.refreshEditorConfiguration(); 60 } 61 if (ba.getImplementationEditor()!=null && (ba.getImplementationEditor().getGraph().getXMLPackage()!= 62 JaWE.getInstance().getRealXMLPackage() || 63 ba.getImplementationEditor().getGraph().getXMLPackage().isReadOnly())) { 64 ba.getImplementationEditor().setButtonsEnabled(false); 65 } 66 ba.showBlockActivity(parentW); 67 graph.setPropertyObject( 69 (org.enhydra.jawe.xml.elements.WorkflowProcess) 70 graph.getPropertyObject()); 71 graph.repaint(); 72 } 73 } 74 } 75 | Popular Tags |