public void parameterChanged(ParameterChangeEvent e) {

		Object source = e.getSource();

		if (source instanceof Element) {
			int elementID = ((Element) source).getID();
			int eventType = e.getType();
			if (eventType == Element.ALL_CHANGED || eventType == Element.SIGMA_CHANGED) {
				setCutOffMatrix(rCutOff);
				setListMatrix(rList);
			}
			for (int i = 0; i < numberOfAtoms; i++) {
				if (atom[i].id == elementID)
					atom[i].setElement(getElement(elementID));
			}
			if (view.getUseJmol())
				view.refreshJmol();
			updateParArray = true;
		} else if (source instanceof Affinity) {
			updateParArray = true;
		} else {

			String name = e.getParameterName();
			if (name.equals("Excited state removed")) {
				Element elem = (Element) e.getNewValue();
				EnergyLevel level = (EnergyLevel) e.getOldValue();
				for (int i = 0; i < numberOfAtoms; i++) {
					if (atom[i].id == elem.getID()) {
						if (atom[i].getElectron(0).getEnergyLevel() == level) {
							atom[i].resetElectronsToGroundState();
						}
					}
				}
				notifyChange();
				view.repaint();
			} else if (name.equals("All excited states removed")) {
				Element elem = (Element) e.getNewValue();
				for (int i = 0; i < numberOfAtoms; i++) {
					if (atom[i].id == elem.getID())
						atom[i].resetElectronsToGroundState();
				}
				notifyChange();
				view.repaint();
			} else if (name.equals("Excited state moved") || name.equals("Excited state inserted") || name.equals("Lifetime changed")) {
				notifyChange();
			}

		}

	}