Package org.eclipse.wb.draw2d.geometry

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


    DocumentElement layer = location.layer;
    Rectangle bounds = widget.getBounds();
    // TopHeight
    if (location.leading != null && location.size != null) {
      if (direction == ResizeDirection.LEADING) {
        int oldTop = bounds.top();
        int deltaHeight = height - bounds.height;
        int top = oldTop - deltaHeight;
        setPixels(location.leading, top);
      }
      setPixels(location.size, height);
View Full Code Here


      return;
    }
    // TopBottom
    if (location.leading != null && location.trailing != null) {
      if (direction == ResizeDirection.LEADING) {
        int oldTop = bounds.top();
        int deltaHeight = height - bounds.height;
        int top = oldTop - deltaHeight;
        setPixels(location.leading, top);
      }
      if (direction == ResizeDirection.TRAILING) {
View Full Code Here

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

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

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

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

    // TopHeight
    {
      MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetTopHeight");
      if (invocation != null) {
        if (direction == ResizeDirection.LEADING) {
          int oldTop = bounds.top();
          int deltaHeight = height - bounds.height;
          int top = oldTop - deltaHeight;
          setInvocationArgument(invocation, 1, top, false);
        }
        setInvocationArgument(invocation, 3, height, false);
View Full Code Here

    // TopBottom
    {
      MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetTopBottom");
      if (invocation != null) {
        if (direction == ResizeDirection.LEADING) {
          int oldTop = bounds.top();
          int deltaHeight = height - bounds.height;
          int top = oldTop - deltaHeight;
          setInvocationArgument(invocation, 1, top, false);
        }
        if (direction == ResizeDirection.TRAILING) {
View Full Code Here

      if (anchor == Anchor.NONE) {
        editor.removeEnclosingStatement(invocation);
      }
      if (anchor == Anchor.LEADING) {
        editor.replaceInvocationName(invocation, "setWidgetTopHeight");
        setInvocationArgument(invocation, 1, bounds.top(), true);
      }
      if (anchor == Anchor.BOTH) {
        editor.replaceInvocationName(invocation, "setWidgetTopBottom");
        {
          Expression rightExpression = DomGenerics.arguments(invocation).get(1);
View Full Code Here

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