Package bnGUI.venn.db

Examples of bnGUI.venn.db.VennFilteredDataModel


        }

        checkModelAndFilterCompatibility(model, filter);
       
        venn.setDataModel(filter == null ? model : new VennFilteredDataModel(model, filter));

        vennArrsOptim.clearObservers();
       
        if( simFile.value != null )
        {
View Full Code Here


         

        filterToUse = (GODistanceFilter)dataModel.getFilter().clone();
          filterToUse.setUser(null);
          origDataModel.setSucc(null);
          modelToUse = new VennFilteredDataModel((IVennDataModel) SystemUtility.serialClone(origDataModel), filterToUse);
          resetButton.setEnabled(false);
          fireActionPerformed( new ActionEvent(this,0,"update") );
          return;
        }
       
View Full Code Here

          makeComboBox(false, false, true, true, true, true, true, true);
        } else {
          throw new IllegalArgumentException();
        }

        dataModel = new VennFilteredDataModel(sourceDataModel, filter0);
//        dataModel.addChangeListener( this );
        dataModel.setSucc(this);
        dataModel.notifySucc();
       
      // set maxPFDR spinner data
View Full Code Here

    // updates the Venn diagram
        //venn.setDataModel( filteredDataModel.createCopy() );

    vennArrsOptim.stopForRestart(); // stop if running

    final VennFilteredDataModel filteredDataModel = filterPanel.getFilteredDataModel();
    venn.setDataModel( filteredDataModel );
    catTable.setDataModel(filteredDataModel); // for table header (p/fdr)
   
    vennArrsOptim.restart();
View Full Code Here

        });
        dataSplitter.setSuccFinal();
       
        manualFilter = new ManualFilter();

        filteredModel = new VennFilteredDataModel();
       
    params = new AllParameters();
   
    setLayout(null);
       
View Full Code Here

   */
  public void restoreLabels() {
    if (labels != null) {
      VennFilteredDataModel[] models = dataSplitter.getModels();
      for (int i = 0; i < models.length; i++) {
        VennFilteredDataModel model = models[i];

        final BitSet groups = model.getGroups();
        final BitSet ggroups = filteredModel.localToGlobalGroupID(groups);

        //search label
        for (int k = 0; k < labels.size(); k++) {
          DragLabel label = labels.get(k);
          if (label == null) continue;

          BitSet ggroupsAndLabelPath = (BitSet) ggroups.clone();
          ggroupsAndLabelPath.and(label.getPath());
          if (label.getPath().cardinality() == ggroupsAndLabelPath.cardinality()) {
            //label found for this model (label path has no groups which don't exist in model)
           
            BitSet glabelPath = filteredModel.globalToLocalGroupID(label.getPath());
            label.setPath(model.globalToLocalGroupID(glabelPath));

            ((VennDiagramView) views[i]).add(label);
            labels.set(k, null);
          }
        }
View Full Code Here

  private void restoreManuallySetColors() {
    if (pathColors != null) {
      VennFilteredDataModel[] models = dataSplitter.getModels();
      for (int i = 0; i < models.length; i++) {
        VennFilteredDataModel model = models[i];

        final BitSet groups = model.getGroups();
        final BitSet ggroups = filteredModel.localToGlobalGroupID(groups);

        Map<BitSet, Color> pathColorsForModel = new HashMap<BitSet, Color>();
        //search color
        for (Map.Entry<BitSet, Color> entr : pathColors.entrySet()) {
          BitSet path = entr.getKey();
          Color color = entr.getValue();

          BitSet ggroupsAndColorPath = (BitSet) ggroups.clone();
          ggroupsAndColorPath.and(path);
          if (path.cardinality() == ggroupsAndColorPath.cardinality()) {
            //color found for this model (color path has no groups which don't exist in model)
           
            assert color != null;
            BitSet gcolorPath = filteredModel.globalToLocalGroupID(path);
            pathColorsForModel.put(model.globalToLocalGroupID(gcolorPath), color);
            entr.setValue(null);
          }
        }
        ((VennDiagramView) views[i]).setColors(pathColorsForModel);
      }
View Full Code Here

        vennArrsOptim.setParameters(params);
        venn = new VennPanel(vennArrsOptim);
    venn.setDataModel(loadFiles.getSourceDataModel());
   
    model = loadFiles.getSourceDataModel();
        venn.setDataModel(filter == null ? model : new VennFilteredDataModel(model, filter));
  }
View Full Code Here

TOP

Related Classes of bnGUI.venn.db.VennFilteredDataModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.