Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.IFigure.translateToRelative()


    // want to
    // enlarge the canvas, since that may resulting in relayout.
    rect = (PrecisionRectangle) rect.intersect(getFeedbackLayer()
        .getBounds());

    feedback.translateToRelative(rect);
    feedback.setBounds(rect);
  }

    public Cursor getSelectionToolCursor(Point mouseLocation) {
        // by default return null to indicate system default. 
View Full Code Here


  protected PointList getPointListFor(CreatePointlistRequest request) {
    IFigure figure = getLayoutContainer();

    PointList points = getNormalizedPointList(request.getPoints());

    figure.translateToRelative(points);
    figure.translateFromParent(points);
    points.translate(getLayoutOrigin().getNegated());

    return points;
  }
View Full Code Here

      }

      IFigure fig = new FadeIn(color);
      guide[offset] = fig;
      addFeedback(fig);
      fig.translateToRelative(loc);
      position = offset % 2 == 0 ? (int) Math.round(loc.preciseX()) : (int) Math.round(loc.preciseY());
      Rectangle figBounds = getFeedbackLayer().getBounds().getCopy();
      if ((offset % 2) != 0) {
        figBounds.height = 2;
        figBounds.y = position;
View Full Code Here

    installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ActivityContainerHighlightEditPolicy());
  }

  private boolean directEditHitTest(Point requestLoc) {
    IFigure header = ((SubgraphFigure) getFigure()).getHeader();
    header.translateToRelative(requestLoc);
    if (header.containsPoint(requestLoc)) {
      return true;
    }
    return false;
  }
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.