@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		if(button.getText().equals("Stop Play Record")){
			player.stopThread();
			interf.deleteMyWindowListener();
			button.setText("Start Play Record");
			if(Optiums.DISABLES_BUTTONS)
				buttonRecorder.setEnabled(true);
		}else{		
			if(Optiums.DISABLES_BUTTONS)
				buttonRecorder.setEnabled(false);
			File fileDir = new File(edit.getText() +"." +  Optiums.FILE_TYPE.toString().toLowerCase());
			if(fileDir.exists()){
				try {
					player = new Player(fileDir, button, buttonRecorder);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					//e.printStackTrace();
					edit.setText("Something go wrong.");
					if(Optiums.DISABLES_BUTTONS)
						buttonRecorder.setEnabled(true);
				}
				player.start(interf.DataSourthForDiagram(player));
				button.setText("Stop Play Record");
			}else{
				edit.setText("Wrong directory.");	
				if(Optiums.DISABLES_BUTTONS)
					buttonRecorder.setEnabled(true);
			}
		}
	}