Beispiel #1
0
 @Override
 final boolean to2(final Displayable d) {
   super.to1(d);
   final Dissector dissector = (Dissector) d;
   final ArrayList<Item> m = new ArrayList<Item>();
   for (final Item item : items) { // no memfn ...
     m.add((Item) item.clone());
   }
   dissector.al_items = m;
   return true;
 }
Beispiel #2
0
 /** Returns a deep copy. */
 @Override
 public Displayable clone(final Project pr, final boolean copy_id) {
   final long nid = copy_id ? this.id : pr.getLoader().getNextId();
   final Dissector copy =
       new Dissector(
           pr,
           nid,
           this.title,
           this.width,
           this.height,
           this.alpha,
           this.visible,
           new Color(color.getRed(), color.getGreen(), color.getBlue()),
           this.locked,
           (AffineTransform) this.at.clone());
   for (final Item item : this.al_items) {
     copy.al_items.add((Item) item.clone());
   }
   copy.addToDatabase();
   return copy;
 }