doOffsetAtPaste = true;
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();	int minx=Integer.MAX_VALUE, miny=Integer.MAX_VALUE;	while (selected.hasMoreElements()) {		obj = selected.nextElement();		if (obj instanceof VisibleObject) {			minx = Math.min(minx, ((VisibleObject)obj).getX());			miny = Math.min(miny, ((VisibleObject)obj).getY());		}	}		// remember position for paste	pasteX = (minx - view.getRx()/view.getScale());	pasteY = (miny - view.getRy()/view.getScale());	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);					}	}	// fix links (due to order of copying links might not be validated...)	Group.getClipboard().manageLinks(true);	view.deselectAll();	drawingSurface.repaint();}