private void readRDCInput(File file) {
		try {
			Format fileFormat = getFileFormat(file);
			switch(fileFormat) {
			case Simple:
				if(media.size() == 0) {
					JOptionPane.showMessageDialog(mainFrame, "Please add at least one medium", "Alert", JOptionPane.WARNING_MESSAGE);
					return;
				}
				
				RDCTypeSelectDialog dialog = new RDCTypeSelectDialog(mainFrame, media);
				dialog.setSelectedMedium(lastSelectedMedium); // Recall last selected medium
				dialog.setVisible(true);
				
				if(!dialog.selectionWasMade()) return; // Dialog was dismissed
				
				int mediumIndex = dialog.getSelectedMedium();
				lastSelectedMedium = mediumIndex; // Memorize selected medium
				RDCType selectedType = dialog.getSelectedType();
				
				testSet = parseSimpleInput(file, selectedType);
				testSet.setSequence(sequence);
			//	testSet.setType(selectedType);
				media.get(mediumIndex).addRDCSet(testSet);
										
				refreshMediaPane();

				break;
			case Full:
				AlignmentMedium selectedMedium;
				if(media.size() > 1) {  // Only ask to select medium if there are more than one
					RDCOutputSelectDialog mediumDialog = new RDCOutputSelectDialog(mainFrame, media);
					mediumDialog.setVisible(true);
					
					if(mediumDialog.selectionWasMade())
						selectedMedium = media.get(mediumDialog.getSelectedMedium());
					else
						return; // If no selection was made then stop here
				} else
					selectedMedium = media.get(0);

				Collection<RDCSet> newSets = parseFullInput(file);
				if(newSets == null) {
					JOptionPane.showConfirmDialog(mainFrame, 
							"Failed to extract RDCs from file",
							"Error", JOptionPane.ERROR_MESSAGE);
					return;
				} else {
					for(RDCSet set : newSets)
						selectedMedium.addRDCSet(set);
					
					refreshMediaPane();
				}
				
				break;
			default:
				JOptionPane.showConfirmDialog(mainFrame, 
						"Unknown file format!",
						"Error", JOptionPane.ERROR_MESSAGE);
			}
		} catch (Exception e) {
			JOptionPane.showConfirmDialog(mainFrame, 
					"Can't resolve the dropped file name!",
					"Error", JOptionPane.ERROR_MESSAGE);
			e.printStackTrace();
		}
		
	}