Examples of Figure


Examples of org.rascalmpl.library.vis.figure.Figure

    }
  }
 
  @Override
  public void initElem(IFigureConstructionEnv env, MouseOver mparent, boolean swtSeen, boolean visible, NameResolver resolver){
    Figure fig = resolver.resolveFigure(projectOnId.getValue());
    if(fig instanceof Screen){
      Screen hs = (Screen)fig;
      hs.registerProjection(this);
    }
  }
View Full Code Here

Examples of org.rascalmpl.library.vis.figure.Figure

    innerFig.globalLocation.set(globalLocation);
    innerFig.resize(view,transform);
    double majorSpaceForProjection = size.get(major) - innerFig.size.get(major);
    double majorProjectionOffset = innerFig.size.get(major) * (1.0 - innerFig.prop.get2DReal(major, ALIGN));
    for(Projection p : projections){
      Figure pFrom = p.projectFrom;
      Figure pr = p.projection;
      double projectFromMinor =
        pFrom.globalLocation.get(minor) - globalLocation.get(minor);
      pr.size.set(minor, pFrom.size.get(minor) * pr.prop.get2DReal(minor, SHRINK));
      pr.size.set(major,majorSpaceForProjection * pr.prop.get2DReal(major, SHRINK ));
      pr.size.setMax(pr.minSize);
      pr.localLocation.set(minor,projectFromMinor + (pFrom.size.get(minor) - pr.size.get(minor)) * pr.prop.get2DReal(minor, ALIGN));
      pr.localLocation.set(major,majorProjectionOffset + (majorSpaceForProjection - pr.size.get(major))* pr.prop.get2DReal(major, ALIGN));
      pr.globalLocation.set(globalLocation);
      pr.resize(view, transform);
    }
  }
View Full Code Here

Examples of org.rascalmpl.library.vis.figure.Figure

          break;
        } else if(other.getFrom() == e.getTo() && other.getTo() == e.getFrom()){
          // Reverse edge, copy its arrows
          if(debug)System.err.println("Found reverse edge");
         
          Figure toArrow = e.toArrow;
          //if(toArrow != null)
          //  children.add(toArrow);
          if(toArrow != null && other.fromArrow == null)
            other.fromArrow = toArrow;
         
          Figure fromArrow = e.fromArrow;
          //if(fromArrow != null)
          //  children.add(fromArrow);
         
          if(fromArrow != null && other.toArrow == null)
            other.toArrow = fromArrow;
View Full Code Here

Examples of org.rascalmpl.library.vis.figure.Figure

  private void insertVirtualNode(LinkedList<LinkedList<LayeredGraphNode>> layers, LayeredGraphNode orgFrom, LayeredGraphNode to){
   
    LayeredGraphNode from = orgFrom;
    boolean downwards = from.isAbove(to);
    int delta = downwards ? 1 : -1;
    Figure orgEdgeLabel =  null;
   
    while(Math.abs(to.layer - from.layer) > 1 && !to.hasVirtualOutTo(from)){
      if(debug)System.err.println("insertVirtualNode: " + from.name + "-> " + to.name);
      // Create virtual node
     
View Full Code Here

Examples of research.Figure

        Iterator iterator = selection.iterator();

        Rectangle r = new Rectangle();
        int limit = rect.y + rect.height / 2;
        while (iterator.hasNext()) {
            Figure figure = (Figure) iterator.next();
            if (!(figure instanceof ConnectionFigure)) {
                figure.moveBy(0, limit - figure.center().y);
            }
        }

        drawingEditor.getCurrentView().repairDamage();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.