Package com.projity.pm.graphic.model.cache

Examples of com.projity.pm.graphic.model.cache.GraphicDependency


          }else if (child.getLevel()==level+1){
            hasChild=true;
            childCenter=child.getXbsCenter();
            if (x0==-1||childCenter.getX()<x0) x0=childCenter.getX();
            if (x1==-1||childCenter.getX()>x1) x1=childCenter.getX();
            dependencies.add(new GraphicDependency(node,child,null));
          }
        }
        if (hasChild) setShape(node,ref,(x0+x1)/2,y);
      }
     
View Full Code Here


    }
    protected GraphZone getLinkAt(double x,double y,Iterator i){
    double delta=config.getSelectionSquare();
    double flatness=config.getLinkFlatness();
      Rectangle2D selectionZone=(delta==0)?null:new Rectangle2D.Double(x-delta,y-delta,2*delta+1,2*delta+1);
      GraphicDependency dependency;
    while(i.hasNext()){
      dependency=(GraphicDependency)i.next();
      if (selectionZone==null&&dependency.getPath().contains(x,y)) return dependency==null?null:new GraphZone(dependency);
      else if (selectionZone!=null){
        int segType;
        double lx=-1;
        double ly=-1;
        for (PathIterator j=(flatness<=0)?dependency.getPath().getPathIterator(null):dependency.getPath().getPathIterator(null,flatness);!j.isDone();j.next()){
          switch (j.currentSegment(segment)) {
            case PathIterator.SEG_LINETO:
            //case PathIterator.SEG_CLOSE:
              if (Line2D.ptSegDist(lx,ly,segment[0],segment[1],x,y)<=delta)
                return dependency==null?null:new GraphZone(dependency);
View Full Code Here

          g2.setClip(clipBounds);
        }
      }
      //Modif for offline graphics
     
      GraphicDependency dependency;
      for (Iterator i=getDependenciesIterator();i.hasNext();){
        dependency=(GraphicDependency)i.next();
        paintLink(g2,dependency);
      }
     
View Full Code Here

        paintNode(g2,node,true);
        paintHorizontalLine(g2,node);
      }
    }

    GraphicDependency dependency;
    for (Iterator i=cache.getEdgesIterator();i.hasNext();){
      dependency=(GraphicDependency)i.next();
      //if (nodeList.contains(dependency.getPredecessor())||nodeList.contains(dependency.getSuccessor()))
        paintLink(g2,dependency);
    }
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.model.cache.GraphicDependency

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.