atoms.add(jcpPanel.getRenderPanel().getRenderer().getRenderer2DModel().getHighlightedAtom());
atomsInRange = atoms.iterator();
}
if(atomsInRange==null)
return;
ChangeSingleElectronModule newActiveModule = null;
while(atomsInRange.hasNext()){
IAtom atom = atomsInRange.next();
if(type.equals("add")){
jcpPanel.get2DHub().addSingleElectron(atom);
logger.info("Added single electron to atom");
newActiveModule = new ChangeSingleElectronModule(jcpPanel.get2DHub(), true);
}else{
jcpPanel.get2DHub().removeSingleElectron(atom);
logger.info("Removed single electron to atom");
newActiveModule = new ChangeSingleElectronModule(jcpPanel.get2DHub(), false);
}
}
jcpPanel.get2DHub().updateView();
newActiveModule.setID(type);
jcpPanel.get2DHub().setActiveDrawModule(newActiveModule);
}