Package com.extjs.gxt.ui.client.util

Examples of com.extjs.gxt.ui.client.util.Rectangle


    }
  }

  protected HeaderGroupConfig getGroup(int row, int column) {
    for (HeaderGroupConfig config : getHeaderGroups()) {
      Rectangle r = new Rectangle();
      r.x = config.getColumn();
      r.y = config.getRow();

      r.width = config.getColspan();
      r.height = config.getRowspan();

      if (r.contains(column, row)) {
        return config;
      }
    }
    return null;
  }
View Full Code Here


   * Returns the element's content area bounds.
   *
   * @return the bounds
   */
  public Rectangle getLayoutBounds() {
    Rectangle r = getBounds();
    r.width -= getFrameWidth("lr");
    r.height -= getFrameWidth("tb");
    return r;
  }
View Full Code Here

   * DOM tree to have a region.
   *
   * @return a region containing top, left, bottom, right
   */
  public Region getRegion() {
    Rectangle bounds = getBounds();
    Region r = new Region();
    r.left = bounds.x;
    r.top = bounds.y;
    r.right = r.left + bounds.width;
    r.bottom = r.top + bounds.height;
View Full Code Here

    wrap.setTop(t);

    setTop(0);
    setLeft(0);

    return new Rectangle(l, t, w, h);
  }
View Full Code Here

  }

  private void showInsert(DNDEvent event, Element elem, boolean before) {
    Insert insert = Insert.get();
    insert.show(elem);
    Rectangle rect = El.fly(elem).getBounds();
    int y = before ? rect.y - 2 : (rect.y + rect.height - 4);
    insert.setBounds(rect.x, y, rect.width, 6);
  }
View Full Code Here

  
    if (constrainViewport) {
      int clientHeight = Window.getClientHeight() + XDOM.getBodyScrollTop();
      int clientWidth = Window.getClientWidth() + XDOM.getBodyScrollLeft();

      Rectangle r = el().getBounds();

      int x = r.x;
      int y = r.y;

      if (y + r.height > clientHeight) {
View Full Code Here

      if (subMenu != null && subMenu.isVisible()) {
        Point xy = ce.getXY();
        xy.x += XDOM.getBodyScrollLeft();
        xy.y += XDOM.getBodyScrollTop();

        Rectangle rec = subMenu.el().getBounds();
        if ((subMenu.el() instanceof Layer)) {
          Layer l = (Layer) subMenu.el();
          if (l.isShim() && l.isShadow()) {
            return !rec.contains(xy) && !l.getShadow().getBounds().contains(xy)
                && !l.getShim().getBounds().contains(xy);
          } else if (l.isShadow()) {
            return !rec.contains(xy) && !l.getShadow().getBounds().contains(xy);
          } else if (l.isShim()) {
            return !rec.contains(xy) && !l.getShim().getBounds().contains(xy);
          }
        }

        return !rec.contains(xy);
      }
    }
    return true;
  }
View Full Code Here

    preview.remove();
    if (dragging) {
      dragging = false;
      if (isUseProxy()) {
        if (isMoveAfterProxyDrag()) {
          Rectangle rect = proxyEl.getBounds();
          dragWidget.el().setPagePosition(rect.x, rect.y);
        }
        proxyEl.setVisibility(false);
        proxyEl.disableTextSelection(false);
        DeferredCommand.addCommand(new Command() {
View Full Code Here

    return input;
  }

  @Override
  protected void onBlur(ComponentEvent ce) {
    Rectangle rec = button.el().getBounds();
    if (rec.contains(BaseEventPreview.getLastXY())) {
      ce.stopEvent();
      return;
    }
    super.onBlur(ce);
    focusPreview.remove();
View Full Code Here

  }

  protected void shim(NodeList<Element> elements) {
    for (int i = 0; i < elements.getLength(); i++) {
      Element e = elements.getItem(i);
      Rectangle bounds = El.fly(e).getBounds(true);
      if (bounds.height > 0 && bounds.width > 0 && El.fly(e).isVisible()) {
        shims.add(createShim(e, bounds.x, bounds.y, bounds.width, bounds.height));
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.util.Rectangle

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.