1 package com.opensymphony.workflow.designer.proxy; 2 3 import com.opensymphony.workflow.loader.ActionDescriptor; 4 import org.jgraph.graph.DefaultGraphCell; 5 6 9 public class ActionProxy implements DefaultGraphCell.ValueChangeHandler 10 { 11 private ActionDescriptor action; 12 13 public ActionProxy(ActionDescriptor d) 14 { 15 action = d; 16 } 17 18 public String toString() 19 { 20 return action == null ? "" : action.getName(); 21 } 22 23 public Object valueChanged(Object newValue) 24 { 25 if(action==null) return ""; 26 String name = action.getName(); 27 action.setName(newValue.toString()); 28 return name; 29 } 30 31 public Object clone() 32 { 33 System.out.println(getClass() + " WARNING: Unexpected clone called on " + this); 34 return this; 35 } 36 37 public ActionDescriptor getDescriptor() 38 { 39 return action; 40 } 41 } 42 | Popular Tags |