@SuppressWarnings("unchecked")
	@Override
	public void actionPerformed(ActionEvent e) {		
		if (Toolbar.CMD_PLAY.equals(e.getActionCommand())) {
			if (simState == seqFinished) {
				// clear map and replay simulation
				mapEntries = (Vector<MapEntry>) mapEntriesReplay.clone();
				mapEntriesReplay.clear();
				try {
					map.clearMap();
				} catch (IOException e1) {
					e1.printStackTrace();
				}
			}
			// continue simulation
			simState = seqRunning;
		} 		
		else if (Toolbar.CMD_PAUSE.equals(e.getActionCommand())) {
			// pause simulation
			if (simState == seqRunning) {
				simState = seqPaused;
			}
		}		
		else if (Toolbar.CMD_STOP.equals(e.getActionCommand())) {
			// stop simulation
			simState = seqStopped;
		}
	}