else if(e.getActionCommand().equals("Data")) { editPane.setText(dataSource.getCurrentInventoryData()); } else if(e.getActionCommand().equals("Readable Data")) { String xmlString = dataSource.getCurrentInventoryData(); if((inventory == null) || (xmlString == null) || (xmlString.trim().equals(""))) { return; } StringWriter writer = new StringWriter(); try { inventory.writeHRString(writer); writer.flush(); } catch(IOException ioe) { throw new RuntimeException(ioe); } editPane.setText(writer.toString()); }
    public void actionPerformed(ActionEvent e) {	if(e.getActionCommand().equals(InventoryMenuEvent.MENU_Exit)) {	    System.exit(0);	}	else if(e.getActionCommand().equals(InventoryMenuEvent.MENU_Connect)) {	    connectToServlet();	}	else if(e.getActionCommand().equals("Parse")) {	    logger.info("Parsing");	    inventory = parser.parseString(editPane.getText());	    multiChart.setData(inventory);	}    }