public void undo() {
			super.undo();
			doNotFireUndoEvent = true;
			int n = getModel().getNumberOfParticles();
			switch (undoID) {
			case UndoAction.TRANSLATE_MODEL:
				for (int i = 0; i < n; i++) {
					getModel().getParticle(i).restoreState();
				}
				n = getModel().getObstacles().size();
				for (int i = 0; i < n; i++) {
					getModel().getObstacles().get(i).restoreState();
				}
				if (!layerBasket.isEmpty()) {
					synchronized (layerBasket) {
						for (Layered l : layerBasket) {
							((ModelComponent) l).restoreState();
						}
					}
				}
				break;
			case UndoAction.ROTATE_MODEL:
				for (int i = 0; i < n; i++) {
					getModel().getParticle(i).restoreState();
				}
				break;
			}
			doNotFireUndoEvent = false;
			getModel().notifyChange();
			if (MDView.this instanceof AtomisticView)
				((AtomisticView) MDView.this).refreshJmol();
			repaint();
		}