Package net.wigis.graph.dnv

Examples of net.wigis.graph.dnv.SubGraph


    double width = originalMaxX - originalMinX;
    double minX = minXPercent * width + originalMinX;
    double maxX = maxXPercent * width + originalMinX;
    double minY = minYPercent * height + originalMinY;
    double maxY = maxYPercent * height + originalMinY;
    SubGraph subGraph = new SubGraph( graph, level );
    if( graph.getVisibleNodes( level ).size() < 2000 || ( minXPercent == 0 && minYPercent == 0 && maxXPercent == 1 && maxYPercent == 1 ) )
    {
      subGraph.setEdges( graph.getVisibleEdges( level ) );
      subGraph.setNodes( graph.getVisibleNodes( level ) );
      return subGraph;
    }
   
    List<DNVNode> nodes = new ArrayList<DNVNode>( graph.getVisibleNodes( level ).values() );
    DNVNode tempNode;
    if( nodes != null )
    {
      for( Iterator<DNVNode> i = nodes.iterator(); i.hasNext(); )
      {
        tempNode = i.next();
        if( tempNode.isVisible() && isNodeWithin( tempNode, minX, minY, maxX, maxY ) )
        {
          // Add the node
          subGraph.add( tempNode );
          // Add all the neighbor nodes
          subGraph.addAllNodes( tempNode.getNeighbors( true ) );
          // Add the edges to all the neighbors
          subGraph.addAllEdges( tempNode.getFromEdges( true ) );
          subGraph.addAllEdges( tempNode.getToEdges( true ) );
        }
      }
    }

    return subGraph;
View Full Code Here


      double minY = getMinY();
      double maxX = getMaxX();
      double maxY = getMaxY();

      findSubGraph();
      SubGraph subGraph = this.subGraph;
      int edgeThickness = (int)this.edgeThickness;
      if( overview )
      {
        edgeThickness = 1;
        level = 0;
View Full Code Here

TOP

Related Classes of net.wigis.graph.dnv.SubGraph

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.