コード例 #1
0
ファイル: Trends.java プロジェクト: Gorbush/jagger
    @Override
    public void onSelectionChange(SelectionChangeEvent event) {

      Set<TaskDataDto> selected =
          ((MultiSelectionModel<TaskDataDto>) event.getSource()).getSelectedSet();
      List<TaskDataDto> result = new ArrayList<TaskDataDto>(selected);

      TaskDataTreeViewModel taskDataTreeViewModel =
          (TaskDataTreeViewModel) taskDetailsTree.getTreeViewModel();
      MultiSelectionModel<PlotNameDto> plotNameSelectionModel =
          taskDataTreeViewModel.getSelectionModel();

      // chosen plots
      Set<PlotNameDto> plotTempSet = plotNameSelectionModel.getSelectedSet();
      // chosen metrics
      Set<MetricNameDto> metricTempSet = metricPanel.getSelected();

      chosenPlots.clear();
      // Clear markings dto map
      markingsMap.clear();
      taskDataTreeViewModel.clear();
      plotNameSelectionModel.clear();
      metricPanel.updateTests(result);
      taskDataTreeViewModel.populateTaskList(result);
      // Populate available plots tree level for each task for selected session
      for (TaskDataDto taskDataDto : result) {
        taskDataTreeViewModel
            .getPlotNameDataProviders()
            .put(
                taskDataDto,
                new TaskPlotNamesAsyncDataProvider(taskDataDto, summaryPanel.getSessionIds()));
      }
      summaryPanel.updateTests(result);

      if (selectTests) {
        makeSelectionForMetricPanel(metricTempSet, metricPanel, result);
        makeSelectionForTaskDetailsTree(plotTempSet, plotNameSelectionModel, result);
      } else {
        selectTests = true;
        ifItWasLink(result, metricPanel, taskDataTreeViewModel);
      }

      metricTempSet.clear();
      plotTempSet.clear();
    }
コード例 #2
0
ファイル: Trends.java プロジェクト: Gorbush/jagger
    private void updateTests(List<TaskDataDto> tests) {

      MultiSelectionModel<TaskDataDto> model =
          (MultiSelectionModel) testDataGrid.getSelectionModel();
      previousSelectedSet.addAll(model.getSelectedSet());

      model.clear();
      testDataGrid.redraw();
      testDataGrid.setRowData(tests);

      if (chosenSessions.size() == 1) {
        metricPanel.getSelectionModel().clear();
        final boolean selectTestsFinal = selectTests;
        final String sessionId = chosenSessions.get(0);
        PlotProviderService.Async.getInstance()
            .getSessionScopePlotList(
                sessionId,
                new AsyncCallback<Set<String>>() {
                  @Override
                  public void onFailure(Throwable throwable) {
                    throwable.printStackTrace();
                  }

                  @Override
                  public void onSuccess(Set<String> plotNames) {
                    sessionPlotPanel.update(sessionId, plotNames);
                    if (!selectTestsFinal) {
                      sessionPlotPanel.setSelected(place.getSessionTrends());
                    }
                    sessionPlotPanel
                        .getSelectionModel()
                        .addSelectionChangeHandler(new SessionScopePlotSelectionChangedHandler());
                    SelectionChangeEvent.fire(sessionPlotPanel.getSelectionModel());
                  }
                });
      }
      makeSelectionOnTaskDataGrid(model, tests);
    }
コード例 #3
0
ファイル: Trends.java プロジェクト: Gorbush/jagger
 @UiHandler("uncheckSessionsButton")
 void handleUncheckSessionsButtonClick(ClickEvent e) {
   MultiSelectionModel model = (MultiSelectionModel<?>) sessionsDataGrid.getSelectionModel();
   model.clear();
 }