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

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


    });
  }

  protected void fitContainer() {
    if (container != null) {
      Rectangle bounds = fly(container).getBounds();
      setPagePosition(bounds.x, bounds.y);
      setSize(bounds.width, bounds.height);
    } else {
      setPosition(0, 0);
      setSize(XDOM.getViewportWidth(), XDOM.getViewportHeight());
View Full Code Here


  }

  protected Layer ghost() {
    Layer g = ghost != null ? ghost : createGhost();
    g.setVisibility(false);
    Rectangle box = getBounds(false);
    g.setBounds(box, true);
    int h = bwrap.getHeight();
    g.getChild(1).setHeight(h - 1, true);
    return g;
  }
View Full Code Here

   * @param shadowPosition the position
   */
  public void setShadowPosition(ShadowPosition shadowPosition) {
    this.shadowPosition = shadowPosition;
    int radius = shadowOffset / 2;
    shadowAdjusts = new Rectangle();
    switch (shadowPosition) {
      case SIDES:
        shadowAdjusts.width = shadowOffset * 2;
        shadowAdjusts.x = -shadowOffset;
        shadowAdjusts.y = shadowOffset - 1;
View Full Code Here

          shim = getShim();
        }
        if (show) {
          shim.show();
        }
        Rectangle a = shadow == null ? new Rectangle(0, 0, 0, 0) : shadowAdjusts;

        if (GXT.isIE && shadow != null && shadow.isVisible()) {
          w += shadowOffset * 2;
          l -= shadowOffset;
          t -= shadowOffset;
View Full Code Here

    sinkEvents(Event.MOUSEEVENTS | Event.FOCUSEVENTS);
  }

  protected void onShowPanel(final ContentPanel panel) {
    this.expanded = true;
    Rectangle box = getBounds(false);

    SplitBar bar = (SplitBar) panel.getData("splitBar");
    if (bar != null) {
      bar.disable();
    }
View Full Code Here

    if (node != null) {
      Element jointEl = view.getJointElement(node);
      if (jointEl != null && tpe.within(jointEl)) {
        toggle((M) tpe.getItem());
      } else if (GXT.isHighContrastMode) {
        Rectangle r = El.fly(jointEl).getBounds();
        if (r.contains(tpe.getClientX(), tpe.getClientY())) {
          toggle((M) tpe.getItem());
        }
      }
      Element checkEl = view.getCheckElement(node);
      if (checkable && checkEl != null && tpe.within(checkEl)) {
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

  
    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

  @Override
  protected boolean shouldDeactivate(ComponentEvent ce) {
    if (super.shouldDeactivate(ce)) {
      if (subMenu != null && subMenu.isVisible()) {
        Rectangle rec = subMenu.el().getBounds();
        if (subMenu.getShadow() && subMenu.getShadowPosition() != null) {
          switch (subMenu.getShadowPosition()) {
            case DROP:
              rec.width += subMenu.getShadowOffset();
              rec.height += subMenu.getShadowOffset();
              break;
            case FRAME:
              rec.width += subMenu.getShadowOffset();
              rec.height += subMenu.getShadowOffset();
              rec.x -= subMenu.getShadowOffset();
              rec.y -= subMenu.getShadowOffset();
              break;
            case SIDES:
              rec.width += subMenu.getShadowOffset();
              rec.height += subMenu.getShadowOffset();
              rec.x -= subMenu.getShadowOffset();
              break;
          }
        }
        return !rec.contains(ce.getXY());
      }
    }
    return true;
  }
View Full Code Here

    sinkEvents(Event.MOUSEEVENTS | Event.FOCUSEVENTS);
  }
 
  protected void onShowPanel(final ContentPanel panel) {
    this.expanded = true;
    Rectangle box = getBounds(false);

    SplitBar bar = (SplitBar) panel.getData("splitBar");
    if (bar != null) {
      bar.disable();
    }
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.