@Override
  public Dimension minimumLayoutSize(final Container container){
    final Container parent = container.getParent();
    if (!(parent instanceof JComponent)) {
      return MIN_SIZE;
    }
    final RadComponent component = (RadComponent)((JComponent)parent).getClientProperty(RadComponent.CLIENT_PROP_RAD_COMPONENT);
    if (component == null) {
      return MIN_SIZE;
    }

    // the following code prevents XYs placed in Grid from being shrunk
    final RadContainer radParent = component.getParent();
    if (radParent != null && (radParent.getLayoutManager().isGrid())) {
      return new Dimension(
        Math.max(myPreferredSize.width, MIN_SIZE.width),
        Math.max(myPreferredSize.height, MIN_SIZE.height)
      );
    }
    return MIN_SIZE;
  }
@Override
  public Dimension minimumLayoutSize(final Container container)