01: package org.enhydra.jawe.components.graph;
02:
03: import java.awt.Point;
04:
05: /**
06: * Used to hold information to properly "graph paste" copied/cut selection.
07: *
08: * @author Sasa Bojanic
09: */
10: public class CopiedActivityInfo {
11:
12: private String parIdEA;
13: private Point offsetPoint;
14:
15: public CopiedActivityInfo(String pId, Point off) {
16: this .parIdEA = pId;
17: this .offsetPoint = off;
18: }
19:
20: public String getParIdEA() {
21: return parIdEA;
22: }
23:
24: public Point getOffsetPoint() {
25: return offsetPoint;
26: }
27:
28: public boolean equals(Object ai) {
29: // System.err.println("... Comparing ainfo "+ai+", to ainfo "+this);
30: if (ai instanceof CopiedActivityInfo) {
31: CopiedActivityInfo ainfo = (CopiedActivityInfo) ai;
32: return this .parIdEA.equals(ainfo.parIdEA)
33: && this .offsetPoint.equals(ainfo.offsetPoint);
34: }
35: return false;
36: }
37:
38: public String toString() {
39: return "<-CopiedActivityInfo: parIdEA=" + parIdEA
40: + ", offsetPoint=" + offsetPoint + "->";
41: }
42:
43: }
|