protected void _relocateComponent(Composite parent, Environment newEnv, Object keyFrom, Object keyTo) throws Exception {
if (!(parent._getComposite().getChildren().get(keyFrom) instanceof Relocatable)) {
throw new AraneaRuntimeException("Child "+keyFrom+" not an instance of Relocatable");
}
Relocatable comp = (Relocatable) parent._getComposite().detach(keyFrom);
comp._getRelocatable().overrideEnvironment(newEnv);
children.put(keyTo, comp);
}