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

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


  protected Point position() {
    Size s = XDOM.getViewportSize();
    int left = s.width - config.width - 10 + XDOM.getBodyScrollLeft();
    int top = s.height - config.height - 10 - (level * (config.height + 10))
        + XDOM.getBodyScrollTop();
    return new Point(left, top);
  }
View Full Code Here


    scrollDownTask.cancel();
    scrollUpTask.cancel();
  }

  protected void onMove(DomEvent de) {
    Point p = new Point(de.getClientX(), de.getClientY());
    if (topBounds.contains(p)) {
      scrollUpTask.delay(scrollDelay);
      scrollDownTask.cancel();
    } else if (bottomBounds.contains(p)) {
      scrollDownTask.delay(scrollDelay);
View Full Code Here

   *          coordinates
   * @return the position
   */
  public Point getPosition(boolean local) {
    if (local) {
      return new Point(el().getLeft(true), el().getTop(true));
    }
    return el().getXY();
  }
View Full Code Here

      pageY = y;
    }
    if (!boxReady) {
      return;
    }
    Point p = getPositionEl().translatePoints(new Point(x, y));
    setPosition(p.x, p.y);
  }
View Full Code Here

    if (!boxReady) {
      return;
    }

    Point p = new Point(left, top);

    p = adjustPosition(p);
    int ax = p.x, ay = p.y;

    El pel = getPositionEl();
View Full Code Here

   * @param pos the position to align to (see {@link El#alignTo} for more
   *          details)
   * @param offsets the offsets
   */
  public void alignTo(Element elem, String pos, int[] offsets) {
    Point p = el().getAlignToXY(elem, pos, offsets);
    setPagePosition(p.x, p.y);
  }
View Full Code Here

  /**
   * Centers the window in the viewport. Should only be called when the window
   * is visible.
   */
  public void center() {
    Point p = el().getAlignToXY(XDOM.getBody(), "c-c", null);
    setPagePosition(p.x, p.y);
  }
View Full Code Here

      hide();
    }

    if (GXT.isAriaEnabled()) {
      if (we.getTarget() == moveBtn.getElement()) {
        Point p = getPosition(true);
        switch (we.getKeyCode()) {
          case KeyCodes.KEY_LEFT:
            setPosition(p.x - ariaMoveResizeDistance, p.y);
            break;
          case KeyCodes.KEY_RIGHT:
View Full Code Here

  }

  @Override
  protected void onAdd(ListStore<ModelData> store, List<ModelData> models, int index) {
    if (enableGrouping) {
      Point ss = getScrollState();
      refresh(false);
      restoreScroll(ss);
    } else {
      super.onAdd(store, models, index);
    }
View Full Code Here

  protected void onMouseMove(ComponentEvent ce) {
    targetXY = ce.getXY();
    if (isRendered() && isAttached() && toolTipConfig.isTrackMouse()) {
      String origAnchor = toolTipConfig.getAnchor();
      Point p = getTargetXY(0);
      toolTipConfig.setAnchor(origAnchor);
      if (constrainPosition) {
        p = el().adjustForConstraints(p);
      }
      setPagePosition(p);
View Full Code Here

TOP

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

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.