|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.util.Util
public class Util
Various utility functions.
Constructor Summary | |
---|---|
Util()
|
Method Summary | ||
---|---|---|
static int |
constrain(int value,
int min,
int max)
Constrains the value by a minimum and max value. |
|
static Component[] |
createArray(java.util.List<Component> list)
Creates a Component[] from a list of Component's. |
|
static java.util.List |
createList(java.util.Collection collection)
Creates a new list from the given collection. |
|
static java.util.List |
createList(java.lang.Object... element)
Creates a new list and adds the element(s). |
|
static boolean |
equalWithNull(java.lang.Object obj1,
java.lang.Object obj2)
|
|
static void |
fill(java.util.List list,
java.lang.Object[] elements)
Populates a list with an array of elements. |
|
static com.google.gwt.core.client.JavaScriptObject |
getJsObject(ModelData model)
Returns the model's data as a javascript object. |
|
static com.google.gwt.core.client.JavaScriptObject |
getJsObject(ModelData model,
int maxDepth)
Returns the model's data as a javascript object. |
|
static com.google.gwt.core.client.JavaScriptObject |
getJsObjects(java.util.List<? extends ModelData> models,
int maxDepth)
Returns the list of models as a javascript array. |
|
static int |
indexOf(java.lang.Object[] elements,
java.lang.Object elem)
Returns the index of a object in an array. |
|
static boolean |
isEmptyString(java.lang.String string)
Returns true if the string is null or equals to the empty string. |
|
static boolean |
isImagePath(java.lang.String style)
Returns true if the style ends with .jpg, .gif, or .png. |
|
static boolean |
isInteger(java.lang.String value)
Tests if the value is an integer. |
|
static
|
or(E s1,
E s2)
|
|
static int |
parseInt(java.lang.String value,
int defaultValue)
|
|
static java.util.List |
subList(java.util.List list,
int start,
int end)
|
|
static com.google.gwt.user.client.Element[] |
toElementArray(com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> nodes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static java.util.List subList(java.util.List list, int start, int end)
public static <E> E or(E s1, E s2)
public static int constrain(int value, int min, int max)
value
- the valuemin
- the minimummax
- the maximum
public static Component[] createArray(java.util.List<Component> list)
list
- the list
public static java.util.List createList(java.util.Collection collection)
collection
- the collection
public static java.util.List createList(java.lang.Object... element)
element
- the item to add to the list
public static boolean equalWithNull(java.lang.Object obj1, java.lang.Object obj2)
public static void fill(java.util.List list, java.lang.Object[] elements)
list
- the listelements
- the elements to be added to the listpublic static com.google.gwt.core.client.JavaScriptObject getJsObject(ModelData model)
model
- the model
public static com.google.gwt.core.client.JavaScriptObject getJsObject(ModelData model, int maxDepth)
model
- the modelmaxDepth
- the maximum number of sub models to process
public static com.google.gwt.core.client.JavaScriptObject getJsObjects(java.util.List<? extends ModelData> models, int maxDepth)
models
- the list of modelsmaxDepth
- the maximum number of sub models to process
public static int indexOf(java.lang.Object[] elements, java.lang.Object elem)
elements
- the arrayelem
- the element
public static boolean isEmptyString(java.lang.String string)
string
- the string to test
public static boolean isImagePath(java.lang.String style)
style
- the style
public static boolean isInteger(java.lang.String value)
value
- the value to test
public static int parseInt(java.lang.String value, int defaultValue)
public static com.google.gwt.user.client.Element[] toElementArray(com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> nodes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |