Examples of translateToRelative()


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

        current.translateToAbsolute(ref2);

        start = current.getSourceAnchor().getLocation(ref1).getCopy();
        end = current.getTargetAnchor().getLocation(ref2).getCopy();

        current.translateToRelative(start);
        current.translateToRelative(end);
        points.setPoint(start, 0);
        points.setPoint(end, points.size() - 1);

        current.setPoints(points);
View Full Code Here

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

        start = current.getSourceAnchor().getLocation(ref1).getCopy();
        end = current.getTargetAnchor().getLocation(ref2).getCopy();

        current.translateToRelative(start);
        current.translateToRelative(end);
        points.setPoint(start, 0);
        points.setPoint(end, points.size() - 1);

        current.setPoints(points);
      }
View Full Code Here

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

      FlowBox box = (FlowBox) fragments.get(i);
      Rectangle rect = new Rectangle(box.getX(), box.getY(), box.getWidth(), box
          .getHeight());
      cssfigure.translateToAbsolute(rect);

      childFigure.translateToRelative(rect);
      childFigure.setBounds(rect);

      createCornerHandles(cssfigure, box);
    }
  }
View Full Code Here

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

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

  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

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

      }

      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

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

    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

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

        Point hintLocation = new Point(mousePosition.x, mousePosition.y+DROP_HINT_VERTICAL_OFFSET);
        Rectangle hintRect = new Rectangle(hintLocation, hintSize);

        //Bug 303524 - [WPE] design view flickers on dnd of jsf html column
        //    (translateToRelative BEFORE intersect, so intersection happens on final display bounds)
        dropHintLabel.translateToRelative(hintRect);
        // we need to intersect the rectangle with the feedback pane, otherwise, when the mouse
        // is dragged near the edge of the viewport with the drop hint active, the canvas will expand
        // away from the mouse.  In future a more ideal solution will be to relocate the tooltip
        // so that is is completely inside the viewport.
        hintRect = hintRect.intersect(getFeedbackLayer().getBounds());
View Full Code Here

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

      if (x > pRight)
        x = rRight + (pRight - rRight) / 2;
    }
    Point p1 = new Point(x, r.y);
    p1 = transposer.t(p1);
    fb.translateToRelative(p1);
    Point p2 = new Point(x, r.y + r.height);
    p2 = transposer.t(p2);
    fb.translateToRelative(p2);
    fb.setPoint(p1, 0);
    fb.setPoint(p2, 1);
View Full Code Here

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

    Point p1 = new Point(x, r.y);
    p1 = transposer.t(p1);
    fb.translateToRelative(p1);
    Point p2 = new Point(x, r.y + r.height);
    p2 = transposer.t(p2);
    fb.translateToRelative(p2);
    fb.setPoint(p1, 0);
    fb.setPoint(p2, 1);
  }

  private boolean isLayoutHorizontal(Request request)
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.