// Формирует список MarginConstraints protected final void gatherConstraints() { selectedConstraints = new ArrayList<>(); for (RADVisualComponent<?> vc : selected) { LayoutSupportDelegate lsd = vc.getParentLayoutSupport().getLayoutDelegate(); assert lsd instanceof MarginLayoutSupport; MarginLayoutConstraints mlc = (MarginLayoutConstraints) lsd.getConstraints(vc.getComponentIndex()); selectedConstraints.add(mlc); } }
public LayoutConstraints<?> getConstraints(RADVisualComponent<?> radComp) { if (layoutDelegate != null) { int index = radComp.getComponentIndex(); // radContainer.getIndexOf(radComp); return index >= 0 && index < layoutDelegate.getComponentCount() ? layoutDelegate.getConstraints(index) : null; } else { return null; } }