Package com.sencha.gxt.core.client.util

Examples of com.sencha.gxt.core.client.util.Point


   * @param alignment the position to align to (see {@link XElement#alignTo} for more details)
   * @param offsetX X offset
   * @param offsetY Y offset
   */
  public void alignTo(Element elem, AnchorAlignment alignment, int offsetX, int offsetY) {
    Point p = getElement().getAlignToXY(elem, alignment, offsetX, offsetY);
    setPagePosition(p.getX(), p.getY());
  }
View Full Code Here


  /**
   * Centers the window in the viewport. Should only be called when the window is visible.
   */
  public void center() {
    Point p = getElement().getAlignToXY(Document.get().getBody(), new AnchorAlignment(Anchor.CENTER, Anchor.CENTER), 0,
        0);
    setPagePosition(p.getX(), p.getY());
  }
View Full Code Here

    hidden = true;

    if (!maximized) {
      restoreSize = getElement().getSize();
      restorePos = new Point(getElement().getLeft(), getElement().getTop());
      viewportSize = XDOM.getViewportSize();
    }

    if (modalPreview != null) {
      modalPreview.removeHandler();
View Full Code Here

    if (isVisible()) {
      if (maximized) {
        fitContainer();
      } else {
        if (constrain) {
          Point p = getElement().adjustForConstraints(getElement().getPosition(false));
          setPagePosition(p.getX(), p.getY());
        }
      }
      if ((GXT.isIE6() || GXT.isIE7()) && (isAutoWidth() || isAutoHeight())) {
        getElement().repaint();
      }
View Full Code Here

   * @param y the y coordinate
   * @param fx the fx instance
   */
  public final void setXY(int x, int y, Fx fx) {
    if (fx == null) {
      setXY(new Point(x, y));
    } else {
      fx.run(new Move(this, x, y));
    }
  }
View Full Code Here

   * Returns the mouse location.
   *
   * @return the mouse location
   */
  public final Point getXY() {
    return new Point(getClientX(), getClientY());
  }
View Full Code Here

      } else if (cright > sright) {
        c.setScrollLeft(cright - scroller.getComputedWidth());
      }
    }

    return cellEl != null ? cellEl.<XElement>cast().getXY() : new Point(c.getAbsoluteLeft() + c.getScrollLeft(), rowEl.<XElement>cast().getY());
  }
View Full Code Here

   * @param rowIndex the row index
   * @param colIndex the column index
   * @param hscroll true to scroll horizontally
   */
  public void focusCell(int rowIndex, int colIndex, boolean hscroll) {
    Point xy = ensureVisible(rowIndex, colIndex, hscroll);
    if (xy != null) {
      focusEl.setXY(xy);
      if (focusEnabled) {
        focus();
      }
View Full Code Here

   * Returns the current scroll state.
   *
   * @return the scroll state
   */
  public Point getScrollState() {
    return new Point(scroller.getScrollLeft(), scroller.getScrollTop());
  }
View Full Code Here

   * @param alignment the position to align to
   * @param offsetX X offset
   * @param offsetY Y offset
   */
  public final void alignTo(Element elem, AnchorAlignment alignment, int offsetX, int offsetY) {
    Point p = getAlignToXY(elem, alignment, offsetX, offsetY);
    setXY(p);
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.core.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.