Package org.eclipse.wb.draw2d.geometry

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


    }
    // prepare location and size
    Point figureLocation;
    {
      Dimension figureSize = figure.getSize();
      figureLocation = new Point(cellRect.right() - offset, cellRect.y - figureSize.height / 2);
      if (figureLocation.x < cellRect.x + MIN_LEFT_SPACE) {
        return;
      }
    }
    // add alignment figure
View Full Code Here


    // RightWidth
    {
      MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetRightWidth");
      if (invocation != null) {
        if (direction == ResizeDirection.TRAILING) {
          int oldRight = getBounds().width - bounds.right();
          int deltaWidth = width - bounds.width;
          int right = oldRight - deltaWidth;
          setInvocationArgument(invocation, 1, right, true);
        }
        setInvocationArgument(invocation, 3, width, true);
View Full Code Here

          int deltaWidth = width - bounds.width;
          int left = oldLeft - deltaWidth;
          setInvocationArgument(invocation, 1, left, true);
        }
        if (direction == ResizeDirection.TRAILING) {
          int oldRight = getBounds().width - bounds.right();
          int deltaWidth = width - bounds.width;
          int right = oldRight - deltaWidth;
          setInvocationArgument(invocation, 3, right, true);
        }
        return;
View Full Code Here

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

        int right = getBounds().width - bounds.right();
        editor.replaceInvocationName(invocation, "setWidgetRightWidth");
        setInvocationArgument(invocation, 1, right, true);
      }
      if (anchor == Anchor.BOTH) {
        int right = getBounds().width - bounds.right();
        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
        setInvocationArgument(invocation, 3, right, true);
      }
      return;
    }
View Full Code Here

      protected void paintClientArea(Graphics graphics) {
        Rectangle r = getClientArea();
        // draw rectangle
        graphics.setForegroundColor(IColorConstants.buttonDarker);
        graphics.drawLine(r.x, r.y, r.x, r.bottom());
        graphics.drawLine(r.right() - 1, r.y, r.right() - 1, r.bottom());
        // draw column index
        int titleLeft;
        {
          String title = "" + getIndex();
          Dimension textExtents = graphics.getTextExtent(title);
View Full Code Here

      protected void paintClientArea(Graphics graphics) {
        Rectangle r = getClientArea();
        // draw rectangle
        graphics.setForegroundColor(IColorConstants.buttonDarker);
        graphics.drawLine(r.x, r.y, r.x, r.bottom());
        graphics.drawLine(r.right() - 1, r.y, r.right() - 1, r.bottom());
        // draw column index
        int titleLeft;
        {
          String title = "" + getIndex();
          Dimension textExtents = graphics.getTextExtent(title);
View Full Code Here

      @Override
      protected void paintClientArea(Graphics graphics) {
        Rectangle r = getClientArea();
        // draw rectangle
        graphics.setForegroundColor(IColorConstants.buttonDarker);
        graphics.drawLine(r.x, r.y, r.right(), r.y);
        graphics.drawLine(r.x, r.bottom() - 1, r.right(), r.bottom() - 1);
        // draw row index
        int titleTop;
        {
          String title = "" + getIndex();
View Full Code Here

      protected void paintClientArea(Graphics graphics) {
        Rectangle r = getClientArea();
        // draw rectangle
        graphics.setForegroundColor(IColorConstants.buttonDarker);
        graphics.drawLine(r.x, r.y, r.right(), r.y);
        graphics.drawLine(r.x, r.bottom() - 1, r.right(), r.bottom() - 1);
        // draw row index
        int titleTop;
        {
          String title = "" + getIndex();
          Dimension textExtents = graphics.getTextExtent(title);
View Full Code Here

      @Override
      protected void paintClientArea(Graphics graphics) {
        Rectangle r = getClientArea();
        // draw rectangle
        graphics.setForegroundColor(IColorConstants.buttonDarker);
        graphics.drawLine(r.x, r.y, r.right(), r.y);
        graphics.drawLine(r.x, r.bottom() - 1, r.right(), r.bottom() - 1);
        // draw row index
        int titleTop;
        {
          String title = "" + (1 + m_dimension.getIndex());
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.