protected void clonePart(LogicSubpart oldPart, LogicDiagram newParent, Rectangle newBounds,
List newConnections, Map connectionPartMap, int index) {
LogicSubpart newPart = null;
if (oldPart instanceof AndGate) {
newPart = new AndGate();
} else if (oldPart instanceof Circuit) {
newPart = new Circuit();
} else if (oldPart instanceof GroundOutput) {
newPart = new GroundOutput();
} else if (oldPart instanceof LED) {