Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Dimension


      Point widgetLocation_inPasteBounds = pastedWidget.getBounds().getLocation();
      Point widgetLocation = pasteLocation.getTranslated(widgetLocation_inPasteBounds);
      m_panel.command_LOCATION(widget, widgetLocation);
    }
    {
      Dimension size = pastedWidget.getBounds().getSize();
      m_panel.command_SIZE(widget, size, ResizeDirection.TRAILING, ResizeDirection.TRAILING);
    }
  }
View Full Code Here


   *         .
   */
  private Image getWidgetImage(WidgetInfo widget) {
    Rectangle bounds = widget.getAbsoluteBounds();
    if (bounds.width == 0 || bounds.height == 0) {
      Dimension forcedSize = getForcedSize();
      return new Image(null, forcedSize.width, forcedSize.height);
    } else {
      RootPanelInfo rootPanel = (RootPanelInfo) widget.getRootJava();
      return UiUtils.getCroppedImage(rootPanel.getImage(), bounds.getSwtRectangle());
    }
View Full Code Here

    Assert.isTrue(
        hasForcedSizePart(width) && hasForcedSizePart(height),
        "Forced size was requested, but no liveComponent.forcedSize.width/height specified.");
    int w = parseSize(width);
    int h = parseSize(height);
    return new Dimension(w, h);
  }
View Full Code Here

        return entry;
      }
    }
    // check if no entry
    if (JavaInfoUtils.hasTrueParameter(m_component, "liveComponent.no")) {
      Dimension forcedSize = getForcedSize();
      setEntry(
          (WidgetInfo) m_component,
          new Image(null, forcedSize.width, forcedSize.height),
          false);
      return getEntry();
View Full Code Here

      PolicyUtils.translateModelToFeedback(m_policy, cellRect);
    }
    // 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;
      }
    }
View Full Code Here

      UIObjectUtils.showWidgets(hiddenWidgets);
    }
  }

  private Rectangle getReasonablePopupBounds(Object popup) throws Exception {
    Dimension popupSize = getPopupSize(popup);
    return new Rectangle(50, 50, popupSize.width, popupSize.height);
  }
View Full Code Here

  @Override
  public void apply() throws Exception {
    dontUseBorderForRootPanel();
    // apply size to get actual widget size
    Dimension resourceSize = getResourceSize();
    doApply(resourceSize);
    // get the real "size" to include full widget
    Dimension size = getExpandedSize();
    // correct size to fit into top-level root panel
    Dimension correctedSize = new Dimension(resourceSize);
    correctedSize.width -= size.width - resourceSize.width;
    correctedSize.height -= size.height - resourceSize.height;
    // apply corrected size to the widget
    if (correctedSize.width > 0 && correctedSize.height > 0) {
      doApply(correctedSize);
View Full Code Here

  private void applySizeUsingScript(Dimension size) throws Exception {
    invokeSizeScript("applyTopBoundsScript", true, size);
  }

  private void setSizeUsingScript(int width, int height) throws Exception {
    invokeSizeScript("setTopBoundsScript", false, new Dimension(width, height));
  }
View Full Code Here

      private final int MARGIN = 6;

      @Override
      public void endVisit(Figure figure) {
        if (figure instanceof AbstractPopupFigure) {
          Dimension size = figure.getSize();
          if (size.width == width + MARGIN && size.height == height + MARGIN) {
            popupFigure[0] = (AbstractPopupFigure) figure;
          }
        }
      }
View Full Code Here

        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);
          if (r.width < 3 + textExtents.width + 3) {
            return;
          }
          // draw title
          titleLeft = r.x + (r.width - textExtents.width) / 2;
View Full Code Here

TOP

Related Classes of org.eclipse.wb.draw2d.geometry.Dimension

Copyright © 2018 www.massapicom. 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.