public void setData(List<VariableDetailsLight> data) { resultsPanel.setResultsLabel(""); resultsPanel.clearResultTable(); if (data.isEmpty()) { return; } resultsPanel.addResultRow(0, new String[] {"Index", "Variable URL"}); for (int i = 0; i < data.size(); ++i) { resultsPanel.addResultRow(i + 1, data.get(i).getDisplayContent()); } resultsPanel.applyResultTableStyles(); }
public int getClickedRow(ClickEvent event) { int selectedRow = -1; HTMLTable.Cell cell = resultsPanel.getResultsTable().getCellForEvent(event); if (cell != null) { // Suppress clicks if the user is actually selecting the // check box // if (cell.getCellIndex() > 0) { selectedRow = cell.getRowIndex(); } } return selectedRow; }
private VerticalPanel createResultsPanel() { resultsPanel = new ResultsPanel(); resultsPanel.setResultTableSize(new String[] {"80px", "500px"}); return resultsPanel; }
public void setNoResultsLabel(List<VariableDetailsLight> data) { if (data.isEmpty()) { resultsPanel.setResultsLabel("No results found for this query"); return; } }
public void clearResultPanel() { resultsPanel.setResultsLabel(""); resultsPanel.clearResultTable(); }
public HasClickHandlers getList() { return resultsPanel.getResultsTable(); }