1 package com.opensymphony.workflow.designer.views; 2 3 import com.opensymphony.workflow.designer.*; 4 import com.opensymphony.workflow.loader.ResultDescriptor; 5 import org.jgraph.graph.*; 6 7 12 public class CustomEdgeView extends EdgeView 13 { 14 public CustomEdgeView(Object obj, WorkflowGraph graph, CellMapper cm) 15 { 16 super(obj, graph, cm); 17 } 18 19 public void setTarget(CellView targetView) 20 { 21 super.setTarget(targetView); 22 if(targetView==null || targetView.getParentView()==null) return; 23 WorkflowCell cell = (WorkflowCell)targetView.getParentView().getCell(); 24 ResultDescriptor d = ((ResultEdge)getCell()).getDescriptor(); 25 if(cell instanceof StepCell) 26 { 27 d.setStep(cell.getId()); 28 } 29 else if(cell instanceof JoinCell) 30 { 31 d.setJoin(cell.getId()); 32 } 33 else if(cell instanceof SplitCell) 34 { 35 d.setSplit(cell.getId()); 36 } 37 } 38 } 39 | Popular Tags |