01: package com.opensymphony.workflow.designer.dnd;
02:
03: import java.awt.datatransfer.DataFlavor;
04: import java.io.Serializable;
05:
06: /**
07: * @author jackflit
08: * Date: 2003-11-27
09: */
10: public class DragData implements Serializable {
11: public static final DataFlavor WORKFLOW_FLAVOR = new DataFlavor(
12: 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 type;
19:
20: private DragData(String type) {
21: this .type = type;
22: }
23:
24: public String getType() {
25: return type;
26: }
27:
28: public void setType(String string) {
29: type = string;
30: }
31:
32: public boolean equals(Object obj) {
33: if (obj instanceof DragData) {
34: return ((DragData) obj).getType().equals(type);
35: }
36: return false;
37: }
38:
39: }
|