Examples of Figure


Examples of org.jhotdraw.framework.Figure

       ConnectionFigure newPrototype) {
    super(newDrawingEditor, newPrototype);
  }

  public Figure implyReservoir(int x, int y, Drawing drawing) {
    Figure target = findConnectableFigure(x, y, drawing);
    if (target == null) {
      target = new ReservoirFigure();
      target.displayBox(new Point(x - 15, y - 15),
          new Point(x + 15, y + 15));
      view().add(target);
    }
    if (target.canConnect()
        && ((target instanceof ReservoirFigure)
        || ((target instanceof ModelElementFigure)
        && (((ModelElementFigure) target).getModelElement()
        instanceof org.nlogo.sdm.Stock)))) {
      return target;
View Full Code Here

Examples of org.newdawn.slick.svg.Figure

   
    NonGeometricData data = Util.getNonGeometricData(element);
    if (count > 3) {
      Shape shape = poly.transform(transform);
     
      diagram.addFigure(new Figure(Figure.POLYGON, shape, data, transform));
    }
  }
View Full Code Here

Examples of org.newdawn.slick.svg.Figure

    data.addAttribute("width", ""+width);
    data.addAttribute("height", ""+height);
    data.addAttribute("x", ""+x);
    data.addAttribute("y", ""+y);
   
    diagram.addFigure(new Figure(Figure.RECTANGLE, shape, data, transform));
  }
View Full Code Here

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

  private double maxMinWidthOfAutoElement(Dimension d){
    double maxMinWidth = 0;
    for(int i = 0; i < getNrColumns(d); i++){
      boolean columnUnresizable  = columnsSize.get(d)[i].sizeInfo == SizeInfo.UNRESIZABLE;
      for(int j = 0 ; j < getNrRows(d) ; j++){
        Figure elem = getFigureFromMatrix(d, j,i);
       
        if(!elem.prop.is2DPropertySet(d, SHRINK) && !columnUnresizable){
          maxMinWidth = Math.max(maxMinWidth,elem.minSize.get(d));
        }
      }
View Full Code Here

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

    double minSizeOfGrid = 0;
    boolean resizable = false;
    boolean autoSize = true;
    boolean allShrinkSet = true;
    for(int row = 0 ; row < getNrRows(d); row++){
      Figure fig = getFigureFromMatrix(d, row, column);
      resizable= resizable || fig.resizable.get(d);
      if(fig.resizable.get(d) && fig.prop.is2DPropertySet(d, SHRINK)){
        autoSize = false;
        maxShrink = Math.max(maxShrink, fig.prop.get2DReal(d, SHRINK));
        minSizeOfGrid = Math.max(minSizeOfGrid, fig.minSize.get(d) / fig.prop.get2DReal(d, SHRINK));
View Full Code Here

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

        case NONE_SHRINK_SET: colWidth =sizeOfAutoElement ; break;
        case UNRESIZABLE: colWidth = s.minSize + extraSpaceForUnresizableCols; break;
      }
     
      for(int row = 0 ; row < getNrRows(d); row++){
        Figure elem = getFigureFromMatrix(d,row,column);
        if(elem.prop.is2DPropertySet(d, SHRINK)){
          elem.size.set(d, elem.prop.get2DReal(d, SHRINK)*spaceForColumns);
        } else if(!elem.resizable.get(d)){
          elem.size.set(d,elem.minSize.get(d));
        } else {
View Full Code Here

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

        gap = majorSizeLeftExcludingGaps / (double)nrOfGaps;
      } else {
        x = (majorSizeLeftExcludingGaps - (nrOfGaps * gap)) * prop.getReal(Properties.INNER_ALIGN);
      }
      for(int j = startOfRow ; j < endOfRow ; j++){
        Figure child = children[j];
        child.size.set(child.minSize);
        child.localLocation.set(major, x);
        child.localLocation.set(minor, y + ( (maxMinor - child.minSize.get(minor)) * prop.get2DReal(minor,ALIGN)));
        x+= child.minSize.get(major) + gap;
      }
View Full Code Here

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

    this.env = env;
    runTimePropertyAdjuster = new RunTimePropertyAdjuster(this);
    children = new ArrayList<FigureSWTApplet>();
    overlapFigures = new LinkedList<Overlap>();
 
    Figure fig = FigureFactory.make(this, cfig, null, null);
    if(!fig.widthDependsOnHeight()){
      fig = new WhiteSpace( fig, new PropertyManager());
    }
    this.figure = fig;
    inputHandler = new InputHandler(this, overlapFigures);
    viewPortHandler = new ViewPortHandler(this,overlapFigures);
View Full Code Here

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

    this.nodes = new ArrayList<SpringGraphNode>();
    this.env = fpa.getCallBackEnv();
    registered = new HashMap<String,SpringGraphNode>();
    for(IValue v : nodes){
      IConstructor c = (IConstructor) v;
      Figure fig = FigureFactory.make(fpa, c, properties, null);
      String name = fig.prop.getStr(ID);

      if(name.length() == 0)
        throw RuntimeExceptionFactory.figureException("Id property should be defined", v, fpa.getRascalContext().getCurrentAST(), fpa.getRascalContext().getStackTrace());
View Full Code Here

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

    if(children.length == 1) return;
    double hg = prop.get2DReal(major, GAP)/2.0;
    if(majorFlipped()){
      hg=-hg;
    }
    Figure root = children[0];
    Coordinate fromRoot = new Coordinate(major,getBottomRoot(),root.globalLocation.get(minor) + root.size.get(minor)/2.0);
   
    if(prop.getBool(MANHATTAN_LINES)){
      Coordinate toCenter = new Coordinate(fromRoot);
      toCenter.add(major,hg);
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.