Package giny.view

Examples of giny.view.NodeView


    CyNetwork network = view.getNetwork();
      @SuppressWarnings("unchecked")
    List<CyNode> nodes = network.nodesList();
      List<CySBMLBoundingBox> boxes = new LinkedList<CySBMLBoundingBox>();
      for (CyNode node : nodes){
        NodeView nodeView = view.getNodeView(node);
       
        String nodeId = node.getIdentifier();
        double xpos = nodeView.getXPosition();
        double ypos = nodeView.getYPosition();
      double height = nodeView.getHeight();
      double width = nodeView.getWidth();
      CySBMLBoundingBox box = new CySBMLBoundingBox(nodeId, xpos, ypos, height, width);
      boxes.add(box);
      }
      // Creates the XML file
      XMLInterface.writeXMLFileForLayout(file, boxes);
View Full Code Here


        for (CyNode node : nodes){
          // if position is stored
          String nodeId = node.getIdentifier();
          if (boxesMap.containsKey(nodeId)){
            CySBMLBoundingBox box = boxesMap.get(nodeId);
            NodeView nodeView = view.getNodeView(node);   
            nodeView.setXPosition(box.getXpos());
            nodeView.setYPosition(box.getYpos());
            // nodeView.setHeight(box.getHeight());
            // nodeView.setWidth(box.getWidth());
          }
        }
        view.updateView();
View Full Code Here

      @SuppressWarnings("unchecked")
    List<CyNode> nodes = network.nodesList();
      CyAttributes nodeAttributes = Cytoscape.getNodeAttributes();
     
      for (CyNode node : nodes){
        NodeView nodeView = view.getNodeView(node);
        // Test if reaction or species node
        String nodeId = node.getIdentifier();
        String nodeType = (String) nodeAttributes.getAttribute(nodeId, CySBMLConstants.ATT_TYPE);
        if (nodeType!=null){
          if (nodeType.equals(CySBMLConstants.NODETYPE_REACTION) || nodeType.equals(CySBMLConstants.NODETYPE_SPECIES)){
           
            double xpos = nodeView.getXPosition();
          double ypos = nodeView.getYPosition();
          double zpos = 0.0;
          double height = nodeView.getHeight();
          double width = nodeView.getWidth();
          double depth = 0.0;
          Dimensions dim = new Dimensions(width, height, depth, level, version);
          Point point = new Point(xpos, ypos, zpos, level, version);
         
          BoundingBox box = new BoundingBox();
View Full Code Here

TOP

Related Classes of giny.view.NodeView

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.