Package cytoscape.visual

Examples of cytoscape.visual.CalculatorCatalog


  }
 
  /// 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


  }
 
  /** 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

TOP

Related Classes of cytoscape.visual.CalculatorCatalog

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.