當前位置: 首頁>>代碼示例>>Java>>正文


Java Style.clearHeight方法代碼示例

本文整理匯總了Java中com.google.gwt.dom.client.Style.clearHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java Style.clearHeight方法的具體用法?Java Style.clearHeight怎麽用?Java Style.clearHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.dom.client.Style的用法示例。


在下文中一共展示了Style.clearHeight方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setRatio

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
public void setRatio() {
    Style style = element.getStyle();

    style.clearWidth();
    style.clearHeight();

    style.setPaddingTop(initialRatio, Style.Unit.PCT);
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:9,代碼來源:ElementScaler.java

示例2: unclipImage

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
private void unclipImage() {
  Style style = image.getElement().getStyle();
  style.clearLeft();
  style.clearTop();
  style.clearWidth();
  style.clearHeight();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:8,代碼來源:MockImageBase.java

示例3: CubaSuggestPopup

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
public CubaSuggestPopup() {
    Style style = loadingImage.getElement().getStyle();

    style.clearWidth();
    style.clearHeight();
    style.setDisplay(Style.Display.BLOCK);
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:8,代碼來源:CubaSuggestPopup.java

示例4: setImageSize

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
private void setImageSize() {
  int width = isFullSize?attachmentWidth:thumbnailWidth;
  int height = isFullSize?attachmentHeight:thumbnailHeight;
  image.setPixelSize(width, height);
  //TODO(user,danilatos): Whinge about how declarative UI doesn't let us avoid this hack:
  Style pstyle = image.getElement().getParentElement().getParentElement().getStyle();
  if (width == 0) {
    image.setWidth("");
    pstyle.clearWidth();
  } else {
    pstyle.setWidth(width, Unit.PX);
  }
  if (height == 0) {
    image.setHeight("");
    pstyle.clearHeight();
  } else {
    pstyle.setHeight(height, Unit.PX);
  }

  String url = isFullSize?attachmentUrl:thumbnailUrl;
  if (url != null) {
    if (doubleBufferLoader == null) {
      doubleBufferLoader = new DoubleBufferImage(spin, errorLabel, image);
    }
    doubleBufferLoader.loadImage(url);
    DOM.setStyleAttribute(image.getElement(), "visibility", "");
  }

  // NOTE(user): IE requires that the imageCaptionContainer element has a width
  //   in order to correctly center the caption.
  if (DO_FRAME_WIDTH_UPDATE) {
    captionPanel.getElement().getStyle().setWidth(width, Unit.PX);
  }
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:35,代碼來源:ImageThumbnailWidget.java

示例5: positionVertically

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public void positionVertically(double currentLocation, double allocatedSpace, double marginBottom) {
    if (!isCaptionInline()) {
        super.positionVertically(currentLocation, allocatedSpace, marginBottom);
        return;
    }

    // CAUTION copied from VLayoutSlot.positionVertically(~)
    Style style = wrapper.getStyle();

    double contentHeight = allocatedSpace;

    int captionHeight;
    VCaption caption = getCaption();
    if (caption == null || caption.shouldBePlacedAfterComponent() || isCaptionInline()) {
        style.clearPaddingTop();
        captionHeight = 0;
    } else {
        captionHeight = getCaptionHeight();
        contentHeight -= captionHeight;
        if (contentHeight < 0) {
            contentHeight = 0;
        }
        style.setPaddingTop(captionHeight, Style.Unit.PX);
    }

    if (marginBottom > 0) {
        style.setMarginBottom(marginBottom, Style.Unit.PX);
    } else {
        style.clearMarginBottom();
    }

    if (isRelativeHeight()) {
        style.setHeight(contentHeight, Style.Unit.PX);
    } else {
        style.clearHeight();
    }

    double allocatedContentHeight = 0;
    if (isRelativeHeight()) {
        String height = getWidget().getElement().getStyle().getHeight();
        double percentage = parsePercent(height);
        allocatedContentHeight = contentHeight * (percentage / 100);
        reportActualRelativeHeight(Math
                .round((float) allocatedContentHeight));
    }

    AlignmentInfo alignment = getAlignment();
    if (!alignment.isTop()) {
        double usedHeight;
        if (isRelativeHeight()) {
            if (isCaptionInline()) {
                usedHeight = allocatedContentHeight;
            } else {
                usedHeight = captionHeight + allocatedContentHeight;
            }
        } else {
            usedHeight = getUsedHeight();
        }
        if (alignment.isVerticalCenter()) {
            currentLocation += (allocatedSpace - usedHeight) / 2d;
        } else {
            currentLocation += (allocatedSpace - usedHeight);
        }
    }

    style.setTop(currentLocation, Style.Unit.PX);
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:69,代碼來源:CubaFieldGroupLayoutComponentSlot.java


注:本文中的com.google.gwt.dom.client.Style.clearHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。