本文整理匯總了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);
}