@SuppressWarnings("static-access")
	public static void stopScan(final int index){
		 if(!frame.isScanning()){
		 JOptionPane.showMessageDialog(null, "There is no scan underway");
		 frame.setCanceled(true);
		 return;
		 }

		 partitionTrees[index].stopBuild();
		 frame.setCanceled(true);
		 }