protected Command getResizeCommand(final ChangeBoundsRequest request) {
return new EditCommand(m_form) {
@Override
protected void executeEdit() throws Exception {
for (EditPart editPart : request.getEditParts()) {
IAbstractComponentInfo widget = (IAbstractComponentInfo) editPart.getModel();
Rectangle bounds = widget.getModelBounds();
if (widget instanceof FormItemInfo) {
m_form.command_BOUNDS((FormItemInfo) widget, bounds.getLocation(), bounds.getSize());
}
if (widget instanceof CanvasInfo) {
m_form.command_BOUNDS(
(FormItemInfo) widget.getUnderlyingModel().getParent(),
bounds.getLocation(),
bounds.getSize());
}
}
}