Package org.eclipse.wb.draw2d.geometry

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


  //
  // Access
  //
  ////////////////////////////////////////////////////////////////////////////
  public void setSize(int width, int height) throws Exception {
    setSize(new Dimension(width, height));
  }
View Full Code Here


    // remove borders
    dontUseBorderForRootPanel();
    // ensure attached
    invokeAttachScript();
    // 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", size);
  }

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

  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  public void apply() throws Exception {
    GwtState state = m_widget.getState();
    Dimension size = getResourceSize();
    // IE in strict mode always has border 2px
    if (state.isStrictMode() && state.isBrowserExplorer()) {
      size.expand(2 + 2, 2 + 2);
    }
    // prepare Shell
    IBrowserShell shell = state.getShell();
    shell.prepare();
    // set Shell size
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

    //return AbsolutePolicyUtils.DEFAULT_CONTAINER_GAP;
    return 0;
  }

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

   */
  public Rectangle getModelBounds(Object element) {
    if (element == null) {
      return new Rectangle();
    }
    Dimension size = getUIObjectSize(element);
    // for BODY we assume (0,0) as top-left
    if (isBody(element)) {
      return new Rectangle(new Point(0, 0), size);
    }
    // for any inner element
View Full Code Here

   */
  public Rectangle getAbsoluteBounds(Object element) {
    if (element == null) {
      return new Rectangle();
    }
    Dimension size = getUIObjectSize(element);
    // for BODY we assume (0,0) as top-left
    Insets margins = getMargins(element);
    if (isBody(element)) {
      int x = 0;
      int y = 0;
View Full Code Here

        {
          Point location = widgetModelBounds.getLocation();
          m_panel.command_LOCATION(component, location);
        }
        if (m_resizeOnCreate) {
          Dimension size = widgetModelBounds.getSize();
          m_panel.command_SIZE(component, size, ResizeDirection.TRAILING, ResizeDirection.TRAILING);
        }
      }
    };
  }
View Full Code Here

      }
    } else {
      width = m_domUtils.getIntAttribute(element, "offsetWidth");
      height = m_domUtils.getIntAttribute(element, "offsetHeight");
    }
    return new Dimension(width, height);
  }
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.