コード例 #1
0
 @Override
 public void onStateManagerDatabaseObjectsSelected(
     List<Event> path, Pathway pathway, DatabaseObject databaseObject) {
   Pathway toSelect = databaseObject instanceof Pathway ? (Pathway) databaseObject : pathway;
   if (!toSelect.equals(selected)) {
     selected = toSelect;
     this.view.selectPathway(toSelect);
   }
 }
コード例 #2
0
ファイル: Path.java プロジェクト: reactome/PathwayBrowser
 public Pathway getLastPathwayWithDiagram() {
   for (int i = this.path.size() - 1; i >= 0; i--) {
     Event event = this.path.get(i);
     if (event instanceof Pathway) {
       Pathway pathway = (Pathway) event;
       if (pathway.getHasDiagram()) return pathway;
     }
   }
   return null;
 }
コード例 #3
0
  @Override
  public void onPathwaySelected(Long dbId) {
    if (selected != null && dbId.equals(selected.getDbId())) return;

    new StableIdentifierLoader(
        dbId.toString(),
        new StableIdentifierLoader.StableIdentifierLoadedHandler() {
          @Override
          public void onStableIdentifierLoaded(AdvancedState advancedState) {
            AnalysisTabPathwaySelected sel =
                new AnalysisTabPathwaySelected(
                    advancedState.getSpecies(),
                    advancedState.getPathway(),
                    (Pathway) advancedState.getInstance());
            selected = (sel.getPathway() != null) ? sel.getPathway() : sel.getDiagram();
            eventBus.fireELVEvent(ELVEventType.ANALYSIS_TAB_PATHWAY_SELECTED, sel);
          }
        });
  }