Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Rectangle.left()


    DocumentElement layer = location.layer;
    Rectangle bounds = widget.getBounds();
    // LeftWidth
    if (location.leading != null && location.size != null) {
      if (direction == ResizeDirection.LEADING) {
        int oldLeft = bounds.left();
        int deltaWidth = width - bounds.width;
        int left = oldLeft - deltaWidth;
        setPixels(location.leading, left);
      }
      setPixels(location.size, width);
View Full Code Here


      return;
    }
    // LeftRight
    if (location.leading != null && location.trailing != null) {
      if (direction == ResizeDirection.LEADING) {
        int oldLeft = bounds.left();
        int deltaWidth = width - bounds.width;
        int left = oldLeft - deltaWidth;
        setPixels(location.leading, left);
      }
      if (direction == ResizeDirection.TRAILING) {
View Full Code Here

      if (anchor == Anchor.NONE) {
        layer.setAttribute("right", null);
        layer.setAttribute("width", null);
      }
      if (anchor == Anchor.LEADING) {
        int left = bounds.left();
        layer.setAttribute("right", null);
        setPixels(location.trailing, "left", left);
      }
      if (anchor == Anchor.BOTH) {
        int left = bounds.left();
View Full Code Here

        int left = bounds.left();
        layer.setAttribute("right", null);
        setPixels(location.trailing, "left", left);
      }
      if (anchor == Anchor.BOTH) {
        int left = bounds.left();
        layer.setAttribute("width", null);
        setPixels(location.trailing, "left", left);
      }
      return;
    }
View Full Code Here

      return;
    }
    // no anchor yet
    if (anchor != Anchor.NONE) {
      if (anchor == Anchor.LEADING) {
        layer.setAttribute("left", bounds.left() + "px");
        layer.setAttribute("width", bounds.width + "px");
      }
      if (anchor == Anchor.TRAILING) {
        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
        layer.setAttribute("width", bounds.width + "px");
View Full Code Here

      if (anchor == Anchor.TRAILING) {
        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
        layer.setAttribute("width", bounds.width + "px");
      }
      if (anchor == Anchor.BOTH) {
        layer.setAttribute("left", bounds.left() + "px");
        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
      }
    }
  }
View Full Code Here

    // LeftWidth
    {
      MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetLeftWidth");
      if (invocation != null) {
        if (direction == ResizeDirection.LEADING) {
          int oldLeft = bounds.left();
          int deltaWidth = width - bounds.width;
          int left = oldLeft - deltaWidth;
          setInvocationArgument(invocation, 1, left, true);
        }
        setInvocationArgument(invocation, 3, width, true);
View Full Code Here

    // LeftRight
    {
      MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetLeftRight");
      if (invocation != null) {
        if (direction == ResizeDirection.LEADING) {
          int oldLeft = bounds.left();
          int deltaWidth = width - bounds.width;
          int left = oldLeft - deltaWidth;
          setInvocationArgument(invocation, 1, left, true);
        }
        if (direction == ResizeDirection.TRAILING) {
View Full Code Here

    if ((invocation = getWidgetInvocation(widget, "setWidgetRightWidth")) != null) {
      if (anchor == Anchor.NONE) {
        editor.removeEnclosingStatement(invocation);
      }
      if (anchor == Anchor.LEADING) {
        int left = bounds.left();
        editor.replaceInvocationName(invocation, "setWidgetLeftWidth");
        setInvocationArgument(invocation, 1, left, true);
      }
      if (anchor == Anchor.BOTH) {
        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
View Full Code Here

        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
        {
          Expression rightExpression = DomGenerics.arguments(invocation).get(1);
          editor.replaceInvocationArgument(invocation, 3, editor.getSource(rightExpression));
        }
        setInvocationArgument(invocation, 1, bounds.left(), true);
      }
      return;
    }
    if ((invocation = getWidgetInvocation(widget, "setWidgetLeftRight")) != null) {
      if (anchor == Anchor.NONE) {
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.