1 package com.opensymphony.workflow.designer; 2 3 import java.awt.*; 4 5 import com.opensymphony.workflow.loader.ResultDescriptor; 6 import com.opensymphony.workflow.designer.views.EdgeRouter; 7 import org.jgraph.graph.GraphConstants; 8 9 14 public class ResultEdge extends WorkflowEdge 15 { 16 private static final EdgeRouter EDGE_ROUTER = new EdgeRouter(); 17 private int index; 18 19 private ResultDescriptor descriptor; 20 21 public ResultEdge(ResultDescriptor descriptor, Point labelPos) 22 { 23 setDescriptor(descriptor); 24 int arrow = GraphConstants.ARROW_CLASSIC; 25 GraphConstants.setLineEnd(attributes, arrow); 26 GraphConstants.setEndFill(attributes, true); 27 GraphConstants.setDisconnectable(attributes, true); 28 GraphConstants.setRouting(attributes, EDGE_ROUTER); 29 if(labelPos!=null) 30 { 31 GraphConstants.setLabelPosition(attributes, labelPos); 32 } 33 } 34 35 public ResultDescriptor getDescriptor() 36 { 37 return descriptor; 38 } 39 40 public void setDescriptor(ResultDescriptor descriptor) 41 { 42 this.descriptor = descriptor; 43 } 44 45 51 public int getIndex() 52 { 53 return index; 54 } 55 56 public void setIndex(int index) 57 { 58 this.index = index; 59 } 60 } 61 | Popular Tags |