@Override
  protected void adjustLocationAndSize(IAddContext context, int width, int height) {

    if (context.getTargetConnection() != null) {
      adjustLocationForDropOnConnection(context);
    }

    super.adjustLocationAndSize(context, width, height);

    if (isImport(context)) {
      return;
    }

    // for backward compatibility with older files that included
    // the label height in the figure height
    if (width != height) {
      width = height = Math.min(width, height);
    }

    if (context instanceof AddContext) {
      AddContext addContext = (AddContext) context;

      addContext.setSize(width, height);
    }
  }
  @Override
  protected void postAddHook(IAddContext context, ContainerShape newShape) {
    super.postAddHook(context, newShape);

    decorate(newShape);
  }