public final class MdlGwtUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addStyle(com.google.gwt.user.client.ui.UIObject object,
Object style)
When
UIObject.addStyleName(String) is invoked with an empty style
name, it raises an exception. |
static void |
assertIndex(int size,
int index)
Make sure the index provided as input is inside the range of possible
elements of a list.
|
static void |
removeStyle(com.google.gwt.user.client.ui.UIObject object,
Object style)
Same behavior as
addStyle(UIObject, Object) but for
UIObject.removeStyleName(String). |
public static void assertIndex(int size,
int index)
size - the size of the listindex - the index to be checkedpublic static void addStyle(com.google.gwt.user.client.ui.UIObject object,
Object style)
UIObject.addStyleName(String) is invoked with an empty style
name, it raises an exception. In mdl, the absence of a selector is
interpreted as the default option for the behavior. For this reason, we
need an alternative to UIObject.addStyleName(String) that does not
raise an exception when it encounter an empty css selector.object - the widget to which the css selector will be appliedstyle - any Object with a Object.toString() method
returning the css selector to be applied.public static void removeStyle(com.google.gwt.user.client.ui.UIObject object,
Object style)
addStyle(UIObject, Object) but for
UIObject.removeStyleName(String).object - the widget to which the css selector will be appliedstyle - any Object with a Object.toString() method
returning the css selector to be applied.addStyle(UIObject, Object)Copyright © 2016 com.github.ilyes4j. All rights reserved.