RestTemplate template = new RestTemplate();
ResponseEntity<ProjectDetail> entity = template.exchange(url, HttpMethod.GET, getHttpEntity(), ProjectDetail.class);
if (entity.getStatusCode() != null && entity.getStatusCode().equals(HttpStatus.OK)) {
ProjectDetail projectDetail = entity.getBody();
((DefaultTableModel) projectsTable.getModel()).addRow(new Object[]{
(projectsTable.getRowCount() + 1),
projectDetail.getAccession(),
projectDetail.getTitle(),
setToString(projectDetail.getSpecies(), ", "),
setToString(projectDetail.getTissues(), ", "),
setToString(projectDetail.getPtmNames(), "; "),
setToString(projectDetail.getInstrumentNames(), ", "),
projectDetail.getNumAssays(),
projectDetail.getSubmissionType(),
null
});
((TitledBorder) projectsPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "PRIDE Projects (" + projectsTable.getRowCount() + ")");
projectsPanel.repaint();
// update the sparklines with the max values
projectsTable.getColumn("#Assays").setCellRenderer(new JSparklinesBarChartTableCellRenderer(PlotOrientation.HORIZONTAL, (double) projectDetail.getNumAssays(), peptideShakerGUI.getSparklineColor()));
((JSparklinesBarChartTableCellRenderer) projectsTable.getColumn("#Assays").getCellRenderer()).showNumberAndChart(true, TableProperties.getLabelWidth());
((JSparklinesBarChartTableCellRenderer) projectsTable.getColumn("#Assays").getCellRenderer()).setLogScale(true);
((JSparklinesBarChartTableCellRenderer) projectsTable.getColumn("#Assays").getCellRenderer()).setMinimumChartValue(2.0);
projectsTable.repaint();