public ResizeProcessor(final GuiEditor editor, final RadComponent component, final int resizeMask){ myEditor = editor; if (component.getParent() == null) { throw new IllegalArgumentException("parent is null for " + component); } myComponent = component; myOriginalParent = component.getParent(); myOriginalConstraints = component.getConstraints(); final List<RadComponent> copyList = CutCopyPasteSupport.copyComponents(editor, Collections.singletonList(component)); if (component.getParent().getLayoutManager().isGrid() && copyList != null) { myComponent.setResizing(true); Rectangle rc = SwingUtilities.convertRectangle(component.getParent().getDelegee(), component.getBounds(), myEditor.getDragLayer()); component.setDragging(true); component.setSelected(false); myResizedCopy = copyList.get(0); myResizedCopy.setBounds(rc); myResizedCopy.setSelected(true); editor.getDragLayer().add(myResizedCopy.getDelegee()); } myResizeMask = resizeMask; setCursor(getResizeCursor()); }