Examples of VisualMappingManager


Examples of cytoscape.visual.VisualMappingManager

      eac.setCalculator(ec);
    }
    vs.setEdgeAppearanceCalculator(eac);
   
    // add global appearance
    VisualMappingManager vmm = Cytoscape.getVisualMappingManager();
    GlobalAppearanceCalculator gac = vmm.getVisualStyle().getGlobalAppearanceCalculator();
    gac.setDefaultBackgroundColor(new Color(new Float(1.0), new Float(1.0), new Float(1.0)));
    vs.setGlobalAppearanceCalculator(gac);
    return vs;
  }
View Full Code Here

Examples of cytoscape.visual.VisualMappingManager

    return styleGen.createVisualStyle();
  }
 
  /// SET VISUAL STYLE ///
  public static void setVisualStyleForNetwork(CyNetwork network, CustomStyle style) {
    VisualMappingManager manager = Cytoscape.getVisualMappingManager();
    CalculatorCatalog catalog = manager.getCalculatorCatalog();
   
    // TODO: less brutal (properties are overwritten)
    String vsName = style.toString();
    VisualStyle vs = catalog.getVisualStyle(vsName);
    if (vs != null) {
      catalog.removeVisualStyle(vsName);
    }
    // only creates the style
    vs = createVisualStyle(style);
    catalog.addVisualStyle(vs);
    manager.setVisualStyle(vs);
   
    // TODO: better get the view for the network
    Cytoscape.getCurrentNetworkView().setVisualStyle(vs.getName());
    Cytoscape.getCurrentNetworkView().applyVizmapper(vs);
  }
View Full Code Here

Examples of cytoscape.visual.VisualMappingManager

     
 
  /** Get the currently set VisualStyle from the Visual mapping manager.
   * Returns null if the VisualStyle does not exist. */
  public static VisualStyle getCurrentVisualStyle(){
    VisualMappingManager vmm = Cytoscape.getVisualMappingManager();
    return vmm.getVisualStyle();
  }
View Full Code Here

Examples of cytoscape.visual.VisualMappingManager

    return vmm.getVisualStyle();
  }
 
  /** Gets visual style from Calculator Catalog. */
  private static VisualStyle getVisualStyle(String vsName){
    VisualMappingManager vmm = Cytoscape.getVisualMappingManager();
    CalculatorCatalog calcCatalog = vmm.getCalculatorCatalog();
    VisualStyle vs = calcCatalog.getVisualStyle(vsName);
    return vs;
  }
View Full Code Here

Examples of org.cytoscape.view.vizmap.VisualMappingManager

    CyRootNetworkManager rootNetworkMgr = (CyRootNetworkManager)getService(bc, org.cytoscape.model.subnetwork.CyRootNetworkManager.class);
    CySwingApplication swingApp = (CySwingApplication)getService(bc, org.cytoscape.application.swing.CySwingApplication.class);
    RenderingEngineFactory dingRenderingEngineFactory = (RenderingEngineFactory)getService(bc, org.cytoscape.view.presentation.RenderingEngineFactory.class, "(id=ding)");
    CyServiceRegistrar serviceRegistrar = (CyServiceRegistrar)getService(bc, org.cytoscape.service.util.CyServiceRegistrar.class);
    VisualStyleFactory visualStyleFactory = (VisualStyleFactory)getService(bc, org.cytoscape.view.vizmap.VisualStyleFactory.class);
    VisualMappingManager visualMappingMgr = (VisualMappingManager)getService(bc, org.cytoscape.view.vizmap.VisualMappingManager.class);
    VisualMappingFunctionFactory discreteMappingFactory = (VisualMappingFunctionFactory)getService(bc, org.cytoscape.view.vizmap.VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
    VisualMappingFunctionFactory continuousMappingFactory = (VisualMappingFunctionFactory)getService(bc, org.cytoscape.view.vizmap.VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
   
    CyTableFactory cyDataTableFactoryServiceRef = getService(bc,CyTableFactory.class);
    MapTableToNetworkTablesTaskFactory mapNetworkAttrTFServiceRef = getService(bc,MapTableToNetworkTablesTaskFactory.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.