public void redo() {
			super.redo();
			doNotFireUndoEvent = true;
			if (presentationName.equals("Translation")) {
				if (mc instanceof GayBerneParticle) {
					((GayBerneParticle) mc).translateTo(x, y);
				} else if (mc instanceof Layered) {
					((Layered) mc).setLocation(x, y);
				}
			} else if (presentationName.equals("Rotation")) {
				if (mc instanceof GayBerneParticle) {
					((GayBerneParticle) mc).setTheta(theta);
					((GayBerneParticle) mc).setSelectedToRotate(true);
				}
			}
			doNotFireUndoEvent = false;
			mc.setSelected(true);
			model.notifyChange();
			repaint();
		}

	}

	private class UndoableResizing extends AbstractUndoableEdit {

		private ModelComponent mc;
		private double x, y;
		private String presentationName = "";

		UndoableResizing(ModelComponent mc) {
			this.mc = mc;
			if (mc instanceof GayBerneParticle) {
				switch (actionID) {
				case RESI_ID:
					x = ((GayBerneParticle) mc).getBreadth();
					y = ((GayBerneParticle) mc).getLength();
					presentationName = "Resizing Particle";
					break;
				case VELO_ID:
					x = ((GayBerneParticle) mc).getVx();
					y = ((GayBerneParticle) mc).getVy();
					presentationName = "Changing Velocity";
					break;
				case OMEG_ID:
					x = ((GayBerneParticle) mc).getOmega();
					presentationName = "Changing Angular Velocity";
					break;
				}
			}
		}

		public String getPresentationName() {
			return presentationName;
		}

		public void undo() {
			super.undo();
			mc.restoreState();
			mc.setSelected(true);
			model.notifyChange();
			repaint();
		}

		public void redo() {
			super.redo();
			doNotFireUndoEvent = true;
			if (mc instanceof GayBerneParticle) {
				if (presentationName.equals("Resizing Particle")) {
					((GayBerneParticle) mc).setBreadth(x);
					((GayBerneParticle) mc).setLength(y);
				} else if (presentationName.equals("Changing Velocity")) {
					((GayBerneParticle) mc).setVx(x);
					((GayBerneParticle) mc).setVy(y);
				} else if (presentationName.equals("Changing Angular Velocity")) {
					((GayBerneParticle) mc).setOmega(x);
				}
			}
			mc.setSelected(true);
			doNotFireUndoEvent = false;
			model.notifyChange();
			repaint();
		}