} else if (oldPart instanceof OrGate) {
newPart = new OrGate();
} else if (oldPart instanceof LogicFlowContainer) {
newPart = new LogicFlowContainer();
} else if (oldPart instanceof XORGate) {
newPart = new XORGate();
}
if (oldPart instanceof LogicDiagram) {
Iterator i = ((LogicDiagram)oldPart).getChildren().iterator();
while (i.hasNext()) {