本文整理汇总了Java中com.google.gwt.dom.client.Style.clearProperty方法的典型用法代码示例。如果您正苦于以下问题:Java Style.clearProperty方法的具体用法?Java Style.clearProperty怎么用?Java Style.clearProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.dom.client.Style
的用法示例。
在下文中一共展示了Style.clearProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setCollapsable
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public void setCollapsable(boolean collapsable) {
Style expanderStyle = expander.getStyle();
if (collapsable) {
expanderStyle.clearProperty("display");
removeStyleDependentName("nocollapsable");
} else {
addStyleDependentName("nocollapsable");
expanderStyle.setDisplay(Style.Display.NONE);
}
Tools.textSelectionEnable(captionNode, !collapsable);
this.collapsable = collapsable;
}
示例2: applyBackgroundSize
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
private void applyBackgroundSize() {
Style style = element().getStyle();
// Set background-repeat to get the right repeating behavior.
String repeat = repeatX ? "repeat-x " : "";
repeat += repeatY ? "repeat-y" : "";
style.setProperty("backgroundRepeat", repeat);
// Set background-size to get the right pinning behavior.
if (sourceRectSet) {
float wratio = widthSet ? (width / sw) : (image().width() / sw);
float hratio = heightSet ? (height / sh) : (image().height() / sh);
if (wratio == 0) {
wratio = 1;
}
if (hratio == 0) {
hratio = 1;
}
float backWidth = image().width() * wratio;
float backHeight = image().height() * hratio;
style.setProperty("backgroundSize", backWidth + "px " + backHeight + "px");
style.setProperty("backgroundPosition", (-sx * wratio) + "px " + (-sy * hratio) + "px");
} else {
String size = repeatX ? image().width() + "px " : "100% ";
size += repeatY ? image().height() + "px" : "100%";
style.setProperty("backgroundSize", size);
style.clearProperty("backgroundPosition");
}
}
示例3: clearMaxWidth
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public void clearMaxWidth() {
Style style = element.getParentElement().getStyle();
style.clearProperty(MAX_WIDTH_PROPERTY);
}
示例4: unfixElementHeight
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
/**
* Unfixes element's height.
*/
public static void unfixElementHeight(Element element) {
Style style = element.getStyle();
style.clearProperty(STYLE_MIN_HEIGHT_PROPERTY);
style.clearProperty(STYLE_MAX_HEIGHT_PROPERTY);
}