if (obj instanceof Flexible) ((Flexible)obj).copyToGroup(Constants.CLIPBOARD_NAME);
if (obj instanceof VisibleObject) { minx = Math.min(minx, ((VisibleObject)obj).getX()); miny = Math.min(miny, ((VisibleObject)obj).getY()); } }  selected = view.getSelectedObjects().elements();  while (selected.hasMoreElements()) { obj = selected.nextElement(); if (obj instanceof Flexible) { Flexible copy = ((Flexible)obj).copyToGroup(Constants.CLIPBOARD_NAME); if (copy instanceof Movable) ((Movable)copy).move(-minx, -miny);  }
public void copy() {	ViewState view = ViewState.getInstance();	if (view.getSelectedObjects().size()==0) return;	Group.getClipboard().destroy();	pasteNames.clear();		Object obj;	Enumeration selected = view.getSelectedObjects().elements();	while (selected.hasMoreElements()) {		obj = selected.nextElement();		if (obj instanceof Flexible)			((Flexible)obj).copyToGroup(Constants.CLIPBOARD_NAME);	}	view.deselectAll();	drawingSurface.repaint();}