Examples of displayBox()


Examples of CH.ifa.draw.framework.Connector.displayBox()

    }

    Connector target = findConnectionTarget(p.x, p.y, view.drawing());
    if (target != null)
    {
      p = Geom.center(target.displayBox());
    }
    setPoint(p.x, p.y);
  }

  /**
 
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

        XFigure figure = overlayFigures [i];

        if (figure.getClass().isAssignableFrom(presentationClass))
        {
          // Yes, we do. Adjust the overlay figure position and orientation accordingly and return it
          figure.displayBox(presentationFigure.displayBox());
          if (presentationFigure instanceof XFigure)
          {
            figure.setOrientation(((XFigure) presentationFigure).getOrientation());
          }
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

    Dimension textDim = textOverlay.getPreferredSize(nChars);

    Figure f = pec.getPresentationFigure();
    if (f == null)
      f = pec;
    Rectangle figureRect = f.displayBox();
    figureRect = getView().applyScale(figureRect, false);
    int figureWidth = figureRect.width;
    int textWidth = textDim.width;

    int w = figureWidth - 10;
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

      }

      maintainRatio = presentationFigure instanceof XTriangleFigure;
      heightOnly = presentationFigure instanceof XCircleFigure;

      Rectangle db = presentationFigure.displayBox();
      origX = db.width;
      origY = db.height;
    }
  }
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

    }

    if (firstFigure != null)
    {
      // Get the bounding rectangle
      Rectangle rect = new Rectangle(firstFigure.displayBox());

      // Enlarge by 100 pixel to prevent it from hanging in the corners
      rect.grow(50, 50);

      workspaceView.scrollRectToVisible(rect);
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

      {
        // Line figures have an inifinite dimension, so we skip them
        continue;
      }

      r.add(f.displayBox());
    }

    // Ensure that the display box of the drawing itself always starts at (0,0)
    r.x = r.y = 0;
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

    Figure endNodeFigure = endSocketFigure.getParent();

    Point startCenter = startSocketFigure.center();
    Point endCenter = endSocketFigure.center();
    Orientation startSocketOrientation = CircleConstants.determineOrientation(startSocketFigure.getAngle(), startNodeFigure.displayBox());
    Orientation endSocketOrientation = CircleConstants.determineOrientation(endSocketFigure.getAngle(), endNodeFigure.displayBox());
    boolean startSocketIsVertical = startSocketOrientation == Orientation.TOP || startSocketOrientation == Orientation.BOTTOM;
    boolean endSocketIsVertical = endSocketOrientation == Orientation.TOP || endSocketOrientation == Orientation.BOTTOM;
    boolean socketsInSync = startSocketIsVertical == endSocketIsVertical;

    // TODO Fix 4: Param autoconnector orientation doesn't work optimal, test...
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

      {
        r = ((LayoutableTag) subFigure).getLayouter().calculateSize();
      }
      else
      {
        r = subFigure.displayBox();
      }

      height = Math.max(r.height, height);

      // Add sub figure width and horizontal insets
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

      {
        r = ((LayoutableTag) subFigure).getLayouter().calculateSize();
      }
      else
      {
        r = subFigure.displayBox();
      }

      // Set the sub figure position and size
      int y = yBaseLine + CommonUtil.rnd(yFactor * r.height);
      r.setLocation(xPos, y);
View Full Code Here

Examples of CH.ifa.draw.framework.Figure.displayBox()

      }

      // Set the sub figure position and size
      int y = yBaseLine + CommonUtil.rnd(yFactor * r.height);
      r.setLocation(xPos, y);
      subFigure.displayBox(r);

      // Add sub figure width and horizontal insets
      xPos += insets.left + insets.right + r.width;
    }
  }
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.