本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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);
}
}
示例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);
}