&& !rootAdapter.isSelected());
}
@Override
public void run() {
VisualDesigner designer = getDesigner();
if(designer==null)
return;
WidgetSelection selection = new WidgetSelection(designer.getRoot());
List<WidgetAdapter> copyedList = new ArrayList<WidgetAdapter>();
for (Component child : selection) {
WidgetAdapter childAdapter = WidgetAdapter.getWidgetAdapter(child);
WidgetAdapter cloneAdapter = (WidgetAdapter) childAdapter.clone();
Component comp = cloneAdapter.getWidget();
comp.setSize(child.getSize());
cloneAdapter.setHotspotPoint(new Point(child.getWidth()/2, child.getHeight()/2));
copyedList.add(cloneAdapter);
}
System.out.println("copy list size:"+copyedList.size());
designer.setSelectedWidget(copyedList);
}