Ejemplo n.º 1
0
  public void delete() {
    // Remove all elements
    ComposableElementController.no_notify_removeAllElements(this.uuid);

    // remove from canvas
    CCanvasController.no_notify_delete_child_connector(this.canvasUID, this.uuid);

    // Remove from groups
    CGroupController.no_notify_delete_child_connector(this.getAnchorUUID(TYPE_HEAD), uuid);
    CGroupController.no_notify_delete_child_connector(this.getAnchorUUID(TYPE_TAIL), uuid);

    if (CCanvasController.canvas_has_child_connector_node(this.canvasUID, uuid)) {
      // This line is not thread safe so must invokeLater to prevent eraser artifacts.
      /*SwingUtilities.invokeLater(
      		new Runnable() { public void run() { removeFromParent(); } }
      );*/
      CalicoDraw.removeNodeFromParent(this);
      // removeFromParent();
    }
  }