public Display displayData(DisplayData data, String title) {
		if (data==null) {
    		logger.warning("Null data in displayData, not displaying title: " + title);
    		JOptionPane.showMessageDialog(this,
    			    "Unable to display data with title " + title + "\n No data found",
    			    "Error displaying file",
    			    JOptionPane.WARNING_MESSAGE);
    		return null;
		}
		
		if (data.numObjects()==0) {
    		logger.warning("No objects found for file : " + data.getFileName());
    		JOptionPane.showMessageDialog(this,
    			    "Unable to display data with title " + title + "\n No data found",
    			    "Error displaying file",
    			    JOptionPane.WARNING_MESSAGE);
    		return null;
		}
		
		
		if (data.numObjects()>1) {
    		JOptionPane.showMessageDialog(this,
    			    "Found multiple displayable objects for this file (" + data.numObjects() + " total) \n But for now we can only display one.",
    			    "Displaying only one element",
    			    JOptionPane.WARNING_MESSAGE);
		}
		
		Class dataClass = data.getData(0).getClass();
		Class preferredDisplayClass = data.getPreferredDisplay();
		Display display = null;
		
		if (preferredDisplayClass != Object.class) {
			for (Display prefDisplay : displayRegistry.getAllDisplays()) {
				if (preferredDisplayClass == prefDisplay.getClass()) {
					display = prefDisplay;
					//System.out.println("Found preferred display of class : " + display.getClass());
					break;
				}
			}
			
		}
		else {
			display = displayRegistry.pickDisplayForObject(data.getData(0));
		}
		
		logger.info("Displaying class " + dataClass.toString() + " title : " + title);
		
		if (display == null) {
    		JOptionPane.showMessageDialog(this,
    			    "Sorry, could not find an appropriate way to display \n data of type " + data.getData(0).getClass() + "\n Cannot display data",
    			    "Error displaying file",
    			    JOptionPane.WARNING_MESSAGE);
		
			logger.info("No display for object of class : " + dataClass.toString());
			return null;
		}

		display(data, display.getNew(), title);
		return display;
	}