KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > dnd > DragData


1 package com.opensymphony.workflow.designer.dnd;
2
3 import java.awt.datatransfer.DataFlavor JavaDoc;
4 import java.io.Serializable JavaDoc;
5
6 /**
7  * @author jackflit
8  * Date: 2003-11-27
9  */

10 public class DragData implements Serializable JavaDoc
11 {
12   public static final DataFlavor JavaDoc WORKFLOW_FLAVOR = new DataFlavor JavaDoc(DragData.class, "WORKFLOWDATA");
13
14   public static final DragData JOIN = new DragData("JOIN");
15   public static final DragData STEP = new DragData("STEP");
16   public static final DragData SPLIT = new DragData("SPLIT");
17
18   private String JavaDoc type;
19
20   private DragData(String JavaDoc type)
21   {
22     this.type = type;
23   }
24
25   public String JavaDoc getType()
26   {
27     return type;
28   }
29
30   public void setType(String JavaDoc string)
31   {
32     type = string;
33   }
34
35   public boolean equals(Object JavaDoc obj)
36   {
37     if(obj instanceof DragData)
38     {
39       return ((DragData)obj).getType().equals(type);
40     }
41     return false;
42   }
43
44 }
45
Popular Tags