当前位置: 首页>>代码示例>>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;未经允许,请勿转载。