KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > proxy > StepProxy


1 package com.opensymphony.workflow.designer.proxy;
2
3 import com.opensymphony.workflow.loader.StepDescriptor;
4
5 import org.jgraph.graph.DefaultGraphCell;
6
7 /**
8  * @author baab
9  */

10 public class StepProxy implements DefaultGraphCell.ValueChangeHandler
11 {
12   private StepDescriptor step;
13
14   public StepProxy(StepDescriptor step)
15   {
16     this.step = step;
17   }
18
19   public String JavaDoc toString()
20   {
21     return step.getName();
22   }
23
24   public Object JavaDoc valueChanged(Object JavaDoc newValue)
25   {
26     String JavaDoc name = step.getName();
27     step.setName(newValue.toString());
28     return name;
29   }
30
31   public Object JavaDoc clone()
32   {
33     System.out.println(getClass() + " WARNING: Unexpected clone called on " + this);
34     return this;
35   }
36 }
37
Popular Tags