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

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


   * Returns the viewports size.
   *
   * @return the viewport size
   */
  public static Size getViewportSize() {
    return new Size(getViewportWidth(), getViewportHeight());
  }
View Full Code Here


    appearance.onHideHeader(getElement(), !visible);
  }

  @Override
  protected void onResize(int width, int height) {
    Size frameSize = getFrameSize();

    if (isAutoWidth()) {
      getContainerTarget().getStyle().clearWidth();
    } else {
      width -= frameSize.getWidth();
      getContainerTarget().setWidth(width - frameSize.getWidth(), true);

    }

    if (isAutoHeight()) {
      getContainerTarget().getStyle().clearHeight();
    } else {
      height -= frameSize.getHeight();
      height -= appearance.getHeaderElement(getElement()).getOffsetHeight();
      getContainerTarget().setHeight(height - frameSize.getHeight(), true);
    }

    super.onResize(width, height);
  }
View Full Code Here

  protected XElement getContainerTarget() {
    return appearance.getContentElem(getElement());
  }

  protected Size getFrameSize() {
    return new Size(appearance.getFrameWidth(getElement()), appearance.getFrameHeight(getElement()));
  }
View Full Code Here

      header.getElement().getStyle().setCursor(Cursor.DEFAULT);
    }
  }

  protected Size adjustBodySize() {
    return new Size(0, 0);
  }
View Full Code Here

    super.doLayout();
  }

  protected void doLayoutButtonBar() {
    if (buttonBar != null) {
      Size containerSize = getContainerTarget().getStyleSize();
      buttonBar.setWidth(containerSize.getWidth());
    }
  }
View Full Code Here

  protected XElement getContainerTarget() {
    return getAppearance().getContentElem(getElement());
  }

  protected Size getFrameSize() {
    return new Size(getAppearance().getFrameWidth(getElement()), getAppearance().getFrameHeight(getElement()));
  }
View Full Code Here

    }
  }

  @Override
  protected void onResize(int width, int height) {
    Size frameSize = getFrameSize();
    Size adjustBodySize = adjustBodySize();

    if (isAutoWidth()) {
      getContainerTarget().getStyle().clearWidth();
    } else {
      width -= frameSize.getWidth();

      if (header != null) {
        int aw = width - appearance.getHeaderElem(getElement()).getFrameWidth(Side.LEFT, Side.RIGHT);
        header.setWidth(aw);
      }
      getContainerTarget().setWidth(width - adjustBodySize.getWidth(), true);
    }

    layoutBars();

    // EXTGWT-2773 - Button bar inner frame height
    if (buttonBar != null) {
      appearance.getFooterElem(getElement()).setHeight(buttonBar.getOffsetHeight());
    }

    if (isAutoHeight()) {
      getContainerTarget().getStyle().clearHeight();
    } else {
      height -= frameSize.getHeight();
      height -= headerVisible ? getAppearance().getHeaderSize(getElement()).getHeight() : 0;
      height -= getAppearance().getFooterElem(getElement()).getHeight(false);

      getContainerTarget().setHeight(height - adjustBodySize.getHeight(), true);
    }

    super.onResize(width, height);
  }
View Full Code Here

      header.getElement().getStyle().setCursor(Cursor.DEFAULT);
    }
  }

  protected Size adjustBodySize() {
    return new Size(0, 0);
  }
View Full Code Here

  protected XElement getContainerTarget() {
    return appearance.getContentElem(getElement());
  }

  protected Size getFrameSize() {
    return new Size(appearance.getFrameWidth(getElement()), appearance.getFrameHeight(getElement()));
  }
View Full Code Here

    }
  }

  @Override
  protected void onResize(int width, int height) {
    Size frameSize = getFrameSize();
    Size adjustBodySize = adjustBodySize();

    if (isAutoWidth()) {
      getContainerTarget().getStyle().clearWidth();
    } else {
      width -= frameSize.getWidth();
      getContainerTarget().setWidth(width - adjustBodySize.getWidth(), true);

      if (header != null) {
        header.setWidth(width);
      }

      if (buttonBar != null) {
        buttonBar.setWidth(width);
      }
    }
    layoutBars();
    if (isAutoHeight()) {
      getContainerTarget().getStyle().clearHeight();
    } else {
      height -= frameSize.getHeight();
      height -= headerVisible ? header.getOffsetHeight() : 0;
      height -= appearance.getFooterElem(getElement()).getHeight(false);
      getContainerTarget().setHeight(height - adjustBodySize.getHeight(), true);
    }

    super.onResize(width, height);
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.core.client.util.Size

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.