Exemplo n.º 1
0
  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();
  }
Exemplo n.º 2
0
  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;
  }
Exemplo n.º 3
0
  private VerticalPanel createResultsPanel() {
    resultsPanel = new ResultsPanel();
    resultsPanel.setResultTableSize(new String[] {"80px", "500px"});

    return resultsPanel;
  }
Exemplo n.º 4
0
 public void setNoResultsLabel(List<VariableDetailsLight> data) {
   if (data.isEmpty()) {
     resultsPanel.setResultsLabel("No results found for this query");
     return;
   }
 }
Exemplo n.º 5
0
 public void clearResultPanel() {
   resultsPanel.setResultsLabel("");
   resultsPanel.clearResultTable();
 }
Exemplo n.º 6
0
 public HasClickHandlers getList() {
   return resultsPanel.getResultsTable();
 }