本文整理匯總了Java中com.google.gwt.user.client.ui.UIObject.removeStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java UIObject.removeStyleName方法的具體用法?Java UIObject.removeStyleName怎麽用?Java UIObject.removeStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.UIObject
的用法示例。
在下文中一共展示了UIObject.removeStyleName方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleChangeStyle
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
private void handleChangeStyle(UIObject object, Element element, List<ChangeStyleActionGVO> actions) {
for (ChangeStyleActionGVO changeStyleAction : actions) {
String action = changeStyleAction.getAction().toLowerCase();
String key = changeStyleAction.getKey();
String style = changeStyleAction.getStyle();
if (ACTION_REMOVE.equals(action)) {
if (key != null && key.trim().length() > 0) {
RendererHelper.setStyleForElement(element, key, null);
}
if (style != null && style.trim().length() > 0) {
object.removeStyleName(style);
}
} else if (ACTION_SET.equals(action)) {
if (key != null && key.trim().length() > 0) {
RendererHelper.setStyleForElement(element, key, changeStyleAction.getValue());
}
if (style != null && style.trim().length() > 0) {
object.addStyleName(style);
}
}
}
}
示例2: removeEnumStyleNames
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
* Removes all CSS style names specified by an enum that implements {@link Style.HasCssName} from an UIObject.
*
* @param uiObject Object to remove CSS class names from
* @param enumClass Enum representing CSS class names
* @param <E> Enum type implementing {@link Style.HasCssName}
*/
public static <E extends Enum<? extends Style.HasCssName>> void removeEnumStyleNames(final UIObject uiObject,
final Class<E> enumClass) {
for (final Enum<? extends Style.HasCssName> constant : enumClass.getEnumConstants()) {
final String cssClass = ((Style.HasCssName) constant).getCssName();
if (cssClass != null && !cssClass.isEmpty()) {
uiObject.removeStyleName(cssClass);
}
}
}
示例3: removeEnumStyleName
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
* Removes enum value style name from UIObject unless style is {@code null}.
*
* @param uiObject Object to remove style from
* @param style Style name
*/
public static <E extends Style.HasCssName> void removeEnumStyleName(final UIObject uiObject,
final E style) {
if (style != null && style.getCssName() != null && !style.getCssName().isEmpty()) {
uiObject.removeStyleName(style.getCssName());
}
}
示例4: toggleStyleName
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
* Toggles a style name on a ui object
*
* @param uiObject Object to toggle style on
* @param toggleStyle whether or not to toggle the style name on the object
* @param styleName Style name
*/
public static void toggleStyleName(final UIObject uiObject,
final boolean toggleStyle,
final String styleName) {
if (toggleStyle) {
uiObject.addStyleName(styleName);
} else {
uiObject.removeStyleName(styleName);
}
}
示例5: applyEnabled
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
private void applyEnabled(boolean enabled, UIObject obj) {
if (enabled) {
obj.removeStyleName(CssName.DISABLED);
obj.getElement().removeAttribute(DISABLED);
} else {
obj.addStyleName(CssName.DISABLED);
obj.getElement().setAttribute(DISABLED, "");
}
}
示例6: handleRequiredClassStyle
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public static void handleRequiredClassStyle(UIObject ui, String invalidClassName, Boolean applyRequiredStyle) {
if(applyRequiredStyle) {
ui.removeStyleName(DEFAULT_VALID_STYLE);
ui.addStyleName(invalidClassName);
} else {
ui.removeStyleName(invalidClassName);
ui.addStyleName(DEFAULT_VALID_STYLE);
}
}
示例7: handleStyle
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public static void handleStyle(ShowPanelGVO showPanelGVO, ShowPanelComponent showPanel, UIObject widget) {
String styleClass = showPanelGVO.getSrc().getStyleClass();
if (styleClass != null) {
// The popup panel inherits the styleClass of the panel-definition
// to avoid a white area on the right and bottom
showPanel.addStyleName(styleClass);
widget.removeStyleName(styleClass);
}
}
示例8: setMask
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public static void setMask(final String componentId, final String className, final boolean mask) {
List<UIObject> uiObjects = ComponentRepository.getInstance().getComponent(componentId);
if (uiObjects == null) {
setMaskNative(componentId, className, mask);
return;
}
for (UIObject uiObject : uiObjects) {
uiObject.removeStyleName(RendererHelper.QAFE_GLASS_PANEL_STYLE);
if (mask) {
uiObject.addStyleName(RendererHelper.QAFE_GLASS_PANEL_STYLE);
}
}
}