Package org.eclipse.wb.draw2d.geometry

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


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


  public int getContainerGapValue(IAbstractComponentInfo component, int direction) {
    return AbsolutePolicyUtils.DEFAULT_CONTAINER_GAP;
  }

  public Dimension getContainerSize() {
    Dimension size = m_canvas.getModelBounds().getSize().getCopy();
    Insets insets = m_canvas.getClientAreaInsets();
    return size.shrink(insets.getWidth(), insets.getHeight());
  }
View Full Code Here

  //
  // "Live" support
  //
  ////////////////////////////////////////////////////////////////////////////
  protected Dimension getLivePreferredSize() {
    Dimension size = super.getLivePreferredSize();
    WidgetInfo widget = getWidget();
    if (size == null && widget != null) {
      size = widget.getPreferredSize();
    }
    return size;
View Full Code Here

      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        Rectangle widgetModelBounds = component.getModelBounds();
        m_canvas.command_absolute_CREATE(component, null);
        Point location = widgetModelBounds.getLocation();
        Dimension size = getSize(widgetModelBounds);
        CanvasInfo boundsCanvas = getBoundsCanvas(component);
        if (boundsCanvas != null) {
          m_canvas.command_BOUNDS(boundsCanvas, location, size);
        }
      }
View Full Code Here

        graphics.drawLine(r.x, r.bottom() - 1, r.right(), r.bottom() - 1);
        // draw row index
        int titleTop;
        {
          String title = "" + (1 + m_dimension.getIndex());
          Dimension textExtents = graphics.getTextExtent(title);
          if (r.height < 3 + textExtents.height + 3) {
            return;
          }
          // draw title
          titleTop = r.y + (r.height - textExtents.height) / 2;
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

            "com.smartgwt.client.widgets.form.DynamicForm",
            new ConstructorCreationSupport());
    {
      // drop Canvas on RootPanel
      panel.command_CREATE2(parentCanvas, null);
      panel.command_BOUNDS(parentCanvas, new Point(10, 10), new Dimension(700, 500));
      // broadcast for set widget as "live"
      parentCanvas.addBroadcastListener(new JavaInfoSetObjectAfter() {
        public void invoke(JavaInfo target, Object o) throws Exception {
          if (target == parentCanvas) {
            parentCanvas.removeBroadcastListener(this);
View Full Code Here

    return AbsolutePolicyUtils.DEFAULT_CONTAINER_GAP;
  }

  public Dimension getContainerSize() {
    ContainerInfo container = m_layout.getContainer();
    Dimension size = container.getModelBounds().getSize();
    Insets insets = container.getClientAreaInsets();
    return new Dimension(size.width - insets.getWidth(), size.height - insets.getHeight());
  }
View Full Code Here

      protected void executeEdit() throws Exception {
        placementsSupport.commitAdd();
        Rectangle widgetModelBounds = component.getModelBounds();
        m_layout.command_CREATE(component, null);
        Point location = widgetModelBounds.getLocation();
        Dimension size = getSize(widgetModelBounds);
        m_layout.command_BOUNDS(component, location, size);
      }

      private Dimension getSize(Rectangle widgetModelBounds) {
        boolean hasForcedSize =
View Full Code Here

  // Refresh
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Dimension fetchObjectSize() throws Exception {
    Dimension objectSize = super.fetchObjectSize();
    if (objectSize.isEmpty()) {
      objectSize = new Dimension(50, 22);
    }
    return objectSize;
  }
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.