public void actionPerformed (ActionEvent e) {
public void actionPerformed (ActionEvent e) { if (DownloadManager.isRunning()) { if (!DownloadManager.getInstance(0, 0, 0, null, null).isPaused()) {  JHoover.getInstance().getDownloadManager().setPauseStatus(true);  ArrayList<DownloadAndParseFile> threadList = DownloadManager.getInstance(0, 0, 0, null, null).getThreadList(); for (int i=0; i<threadList.size(); i++) { synchronized (threadList.get(i)) { threadList.get(i).setPauseStatus(true); } } JOptionPane.showMessageDialog(JHMainFrame.getInstance(), Labels.DOWNLOAD_PAUSED_LABEL, Labels.DOWNLOAD_STATUS_LABEL, JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(JHMainFrame.getInstance(), Labels.DOWNLOAD_ALREADY_PAUSED_LABEL, Labels.DOWNLOAD_STATUS_LABEL, JOptionPane.INFORMATION_MESSAGE); } }
		public void actionPerformed (ActionEvent e) {						//stop the downloadManager Thread//			try {//				JHoover.getDownloadManagerThread().join();//			} catch (InterruptedException e1) {//				// TODO Auto-generated catch block//				e1.printStackTrace();//			}//			//stop all the Threads//			ArrayList<Thread> threadList = DownloadManager.getInstance(0, 0, 0, null, null).getThreadList();//			for (int i=0; i<threadList.size(); i++) {//				//TODO: voir si cela foncionne//				try {//					threadList.get(i).join();//				} catch (InterruptedException e1) {//					// TODO Auto-generated catch block//					e1.printStackTrace();//				}//			}		}