示例#1
0
 Arrow makeCopy(Diagram d) {
   Arrow arr = new Arrow(d);
   arr.fromX = this.fromX;
   arr.fromY = this.fromY;
   arr.toX = this.toX;
   arr.toY = this.toY;
   arr.lastX = this.lastX;
   arr.lastY = this.lastY;
   arr.fromId = this.fromId;
   arr.toId = this.toId;
   arr.id = this.id;
   arr.endsAtBlock = this.endsAtBlock;
   arr.endsAtLine = this.endsAtLine;
   if (this.bends != null) {
     arr.bends = new LinkedList<Bend>();
     for (Bend b : this.bends) {
       Bend b2 = new Bend(b.x, b.y);
       arr.bends.add(b2);
     }
   }
   arr.upStreamPort = this.upStreamPort;
   arr.downStreamPort = this.downStreamPort;
   arr.fromSide = this.fromSide;
   arr.toSide = this.toSide;
   arr.diag = d;
   return arr;
 }