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

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


    public CoordinatesConverter getCoord(){
      return ((GanttUI)ui).getCoord();
    }

    protected void setLinkOrigin(){
      GraphicNode node=(GraphicNode)selected;
    CoordinatesConverter coord=getCoord();
    double xStart=coord.toX((selectedIntervalNumber==0)?node.getStart():selectedInterval.getStart());
    double xEnd=selectedIntervalNumber==0?CoordinatesConverter.adaptSmallBarEndX(coord.toX(node.getStart()),coord.toX(node.getEnd()),node,config):coord.toX(selectedInterval.getEnd());
    x0link=(xStart+xEnd)/2;
    y0link=((GanttUI)ui).getBarY(node.getRow())+node.getGanttShapeOffset()+node.getGanttShapeHeight()/2;

    }
View Full Code Here


      return beforeLinkState==BAR_MOVE||beforeLinkState==BAR_MOVE_START||beforeLinkState==BAR_MOVE_END;
    }

    protected boolean switchOnLinkCreation(double x, double y){
      if (state==PROGRESS_BAR_MOVE) return false;
    GraphicNode node=(GraphicNode)selected;
    Object impl = node.getNode().getImpl();
    return impl instanceof HasDependencies &&
        ((int)y)/((Gantt)getGraph()).getRowHeight()!=node.getRow() ;
    }
View Full Code Here

      format = (BarFormat)arg0;

      GanttLinkRouting routing=(GanttLinkRouting)((GanttParams)graphInfo).getRouting();
      CoordinatesConverter coord=((GanttParams)graphInfo).getCoord();
      //if (format.getMiddle()!=null){
          GraphicNode from=dependency.getPredecessor();
          GraphicNode to=dependency.getSuccessor();
          int type=dependency.getType();
        int fromSign=(type==DependencyType.SF||type==DependencyType.SS)?-1:1;
        int toSign=(type==DependencyType.FS||type==DependencyType.SS)?-1:1;
        double fx0=coord.toX(from.getStart());
        double fx1=coord.toX(from.getEnd());
        fx1=CoordinatesConverter.adaptSmallBarEndX(fx0,fx1,from,config);
        double tx0=coord.toX(to.getStart());
        double tx1=coord.toX(to.getEnd());
        tx1=CoordinatesConverter.adaptSmallBarEndX(tx0,tx1,to,config);
        double x0=fromSign<0?fx0:fx1;
        double x1=toSign<0?tx0:tx1;
        int rowHeight=((GanttParams)graphInfo).getRowHeight();
        int yOffset=config.getGanttBarYOffset()+config.getGanttBarHeight()/2;
        int y0=rowHeight*from.getRow();
        int y1=rowHeight*to.getRow();
        double y2=Math.max(y0,y1);
        y0+=yOffset;
        y1+=yOffset;

        GeneralPath path=dependency.getPath();
        ((GanttLinkRouting)routing).routePath(path,x0,y0,x1,y1,y2,y1+to.getGanttShapeHeight()/2,y1-to.getGanttShapeHeight()/2,type);



        Color oldColor=g2.getColor();
        Stroke oldStroke = g2.getStroke();
View Full Code Here

*/
public class GanttBarIntervalGenerator implements ScheduleIntervalGenerator {
 

  public void consumeIntervals(Object object, IntervalConsumer consumer) {
    GraphicNode node=(GraphicNode)object;
    node.consumeIntervals(consumer);

  }
View Full Code Here

    int i0=(int)Math.floor(bounds.getY()/rowHeight);
    int i1=(int)Math.ceil(bounds.getMaxY()/rowHeight);
    double t0=coord.toTime(bounds.getX());
    double t1=coord.toTime(bounds.getMaxX());

    GraphicNode node;
    for (ListIterator i=nodeIterator;i.hasNext();){
      node=(GraphicNode)i.next();
      node.setRow(i.previousIndex());
      if (i.previousIndex()>=i0&&i.previousIndex()<i1){
        if (!node.isVoid()) updateShape(node);
      }
    }
    }
View Full Code Here

    //double t0=coord.toTime(clipBounds.getX());
    //double t1=coord.toTime(clipBounds.getMaxX());

    nodeList.clear();

    GraphicNode node;
//    for (ListIterator i=graph.getModel().getNodeIterator(i0);i.hasNext()&&i.nextIndex()<=i1;){
//      node=(GraphicNode)i.next();
//      if (!node.isSchedule()) continue;
//      nodeList.add(node);
//      node.setRow(i.previousIndex());
//      paintNode(g2,node,true);
//    } //Because row not initialized for some nodes

    NodeModelCache cache=graphInfo.getCache();
    for (ListIterator i=cache.getIterator();i.hasNext();){
      node=(GraphicNode)i.next();
      node.setRow(i.previousIndex());
      if (i.previousIndex()>=i0&&i.previousIndex()<i1){
        if (!node.isSchedule()) continue;
        nodeList.add(node);
        paintAnnotation(g2,node);
        paintNode(g2,node,true);
        paintHorizontalLine(g2,node);
      }
View Full Code Here

TOP

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

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.