Ejemplo n.º 1
0
  public void refreshLiteratureView() {
    LiteratureReviewController literatureReviewController = new LiteratureReviewController();
    literatureReviews = literatureReviewController.findAllLiteratureReview();

    list.removeAll();
    for (LiteratureReview literatureReview : literatureReviews) {
      list.add(literatureReview.getTitle());
    }
  }
Ejemplo n.º 2
0
    public void widgetSelected(SelectionEvent e) {
      Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
      InputDialog dialog =
          new InputDialog(shell, "Create literature review", "Literature review title", null, null);
      dialog.open();

      if (dialog.getReturnCode() == InputDialog.OK) {
        LiteratureReview literatureReview = new LiteratureReview();

        literatureReview.setTitle(dialog.getValue());

        LiteratureReviewController literatureReviewController = new LiteratureReviewController();
        literatureReviewController.createLiteratureReview(literatureReview);
        refreshLiteratureView();
      }
    }
Ejemplo n.º 3
0
  private void refreshAutomaticSearchTable() {

    sourceTable.removeAll();

    for (Search s : selectedLiteratureReview.getSearches()) {

      if (s instanceof AutomatedSearch) {
        AutomatedSearch as = (AutomatedSearch) s;
        this.QueryLabel.setText(as.getQueryString());

        /*TableItem generalItem = new TableItem (sourceTable, SWT.NONE);
        generalItem.setText(0, "ALL");
        generalItem.setText(1, String.valueOf(selectedLiteratureReview.getTotalFound()));
        generalItem.setText(2, String.valueOf(selectedLiteratureReview.getTotalFetched()));*/

        for (QueryInfo qi : as.getQueryInfos()) {
          TableItem item = new TableItem(sourceTable, SWT.NONE);
          item.setText(0, qi.getSource());
          item.setText(1, String.valueOf(qi.getTotalFound()));
          item.setText(2, String.valueOf(qi.getTotalFound()));
        }

        for (int i = 0; i < sourceTable.getColumnCount(); i++) {
          sourceTable.getColumn(i).pack();
        }
      }
    }
  }
Ejemplo n.º 4
0
  public void refreshCriteriaList() {
    if (selectedLiteratureReview != null) {
      java.util.List<Criteria> cr = selectedLiteratureReview.getCritireon();

      criteriaList.removeAll();
      for (Criteria c : cr) {
        criteriaList.add(c.getName());
      }
    }
  }