@Override
  public void componentLayoutChanged(int index, PropertyChangeEvent ev)
      throws PropertyVetoException {
    RADVisualComponent<?> radComp = radContainer.getSubComponent(index);

    if (ev != null && ev.getPropertyName() != null) {
      layoutDelegate.acceptComponentLayoutChange(index, ev);

      FormModel formModel = radContainer.getFormModel();
      formModel.fireComponentLayoutChanged(
          radComp, ev.getPropertyName(), ev.getOldValue(), ev.getNewValue());

      if (radComp.getNodeReference() != null) // propagate the change to node
      {
        radComp
            .getNodeReference()
            .firePropertyChangeHelper(ev.getPropertyName(), ev.getOldValue(), ev.getNewValue());
      }
    } else {
      if (radComp.getNodeReference() != null) // propagate the change to node
      {
        radComp.getNodeReference().fireComponentPropertySetsChange();
      }
      radComp.resetConstraintsProperties();
    }
  }
  @Override
  public void containerLayoutChanged(PropertyChangeEvent ev) throws PropertyVetoException {
    if (ev != null && ev.getPropertyName() != null) {
      layoutDelegate.acceptContainerLayoutChange(ev);

      FormModel formModel = radContainer.getFormModel();
      formModel.fireContainerLayoutChanged(
          radContainer, ev.getPropertyName(), ev.getOldValue(), ev.getNewValue());
    } else {
      propertySets = null;
    }

    LayoutNode node = radContainer.getLayoutNodeReference();
    if (node != null) {
      // propagate the change to node
      if (ev != null && ev.getPropertyName() != null) {
        node.fireLayoutPropertiesChange();
      } else {
        node.fireLayoutPropertySetsChange();
      }
    }
  }
  // drag and drop support
  public LayoutConstraints<?> getNewConstraints(
      Container container,
      Container containerDelegate,
      Component component,
      int index,
      Point posInCont,
      Point posInComp) {

    LayoutConstraints<?> constraints =
        layoutDelegate.getNewConstraints(
            container, containerDelegate, component, index, posInCont, posInComp);
    String context = null;
    Object[] params = null;
    if (layoutDelegate instanceof AbstractLayoutSupport) {
      AbstractLayoutSupport support = (AbstractLayoutSupport) layoutDelegate;
      context = support.getAssistantContext();
      params = support.getAssistantParams();
    }
    context = (context == null) ? "generalPosition" : context; // NOI18N
    radContainer.getFormModel().getAssistantModel().setContext(context, params);
    return constraints;
  }