public void modelUpdate(ModelEvent e) {
		graph.setTracer(null);
		switch (e.getID()) {
		case ModelEvent.MODEL_INPUT:
		case ModelEvent.MODEL_RESET:
			EventQueue.invokeLater(new Runnable() {
				public void run() {
					refresh(true);
				}
			});
			break;
		case ModelEvent.MODEL_CHANGED:
			if (autoUpdate)
				refresh(false);
			break;
		case ModelEvent.MODEL_RUN:
			if (getModel() == e.getSource()) {
				EventQueue.invokeLater(new Runnable() {
					public void run() {
						enableActions(false);
					}
				});
			}
			break;
		case ModelEvent.MODEL_STOP:
			if (getModel() == e.getSource()) {
				EventQueue.invokeLater(new Runnable() {
					public void run() {
						enableActions(true);
					}
				});
			}
			break;
		}
	}