|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.client.utils.JsUtils
public class JsUtils
| Constructor Summary | |
|---|---|
JsUtils()
|
|
| Method Summary | ||
|---|---|---|
static void |
copyValues(com.google.gwt.core.client.JsArrayMixed input,
com.google.gwt.core.client.JsArrayMixed output)
Append all values contained in input array into the output array |
|
static String |
escape(String input)
|
|
static com.google.gwt.core.client.JavaScriptObject |
fromJSONValue(com.google.gwt.json.client.JSONValue jsonValue)
Extract the associated native javascript object from the given json object |
|
static
|
fromJSONValue(String encodedObject)
Extract the associated native javascript object from the given json string |
|
static
|
fromString(String encodedObject)
Extract the associated native javascript object from the given json string |
|
static boolean |
hasPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
Return true if given object has a property with specified name. |
|
static boolean |
isArray(com.google.gwt.core.client.JavaScriptObject obj)
Check if the given native object represents an array |
|
static boolean |
readBooleanPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
Read properties from native javascript objects. |
|
static double |
readDoublePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
Read properties from native javascript objects. |
|
static int |
readIntPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
Read properties from native javascript objects. |
|
static com.google.gwt.core.client.JavaScriptObject |
readObjectPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
Read properties from native javascript objects. |
|
static void |
readPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JsArrayMixed output)
Read properties from native javascript objects. |
|
static void |
readPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JsArrayMixed output,
boolean includeNull)
Read properties from native javascript objects. |
|
static String |
readStringPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
Read properties from native javascript objects. |
|
static String[] |
toArray(com.google.gwt.core.client.JsArrayString jSArray)
|
|
static FastList<String> |
toFastList(com.google.gwt.core.client.JsArrayString jSArray)
|
|
static com.google.gwt.core.client.JsArrayString |
toJsArray(List<String> list)
|
|
static com.google.gwt.core.client.JsArrayString |
toJsArray(String[] args)
|
|
static com.google.gwt.json.client.JSONValue |
toJSONValue(com.google.gwt.core.client.JavaScriptObject object)
Create a JSONValue Object from a native javascript object |
|
static List<String> |
toList(com.google.gwt.core.client.JsArrayString jSArray)
|
|
static String |
unescape(String input)
|
|
static void |
writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
boolean input)
Write property to native javascript objects. |
|
static void |
writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
double input)
Write property to native javascript objects. |
|
static void |
writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JavaScriptObject input)
Write property to native javascript objects. |
|
static void |
writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JsArrayMixed input,
boolean extractArrayContent)
Write property to native javascript objects. |
|
static void |
writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
String input)
Write property to native javascript objects. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsUtils()
| Method Detail |
|---|
public static void copyValues(com.google.gwt.core.client.JsArrayMixed input,
com.google.gwt.core.client.JsArrayMixed output)
in - out - public static com.google.gwt.json.client.JSONValue toJSONValue(com.google.gwt.core.client.JavaScriptObject object)
object -
public static <T extends com.google.gwt.core.client.JavaScriptObject> T fromString(String encodedObject)
jsonValue -
public static <T extends com.google.gwt.core.client.JavaScriptObject> T fromJSONValue(String encodedObject)
jsonValue -
public static com.google.gwt.core.client.JavaScriptObject fromJSONValue(com.google.gwt.json.client.JSONValue jsonValue)
jsonValue -
public static boolean isArray(com.google.gwt.core.client.JavaScriptObject obj)
obj -
public static boolean hasPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)
public static void readPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JsArrayMixed output)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)output - an array where the output will be written
public static void readPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JsArrayMixed output,
boolean includeNull)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)output - an array where the output will be writtenincludeNull - if true, includes null values on output array
public static String readStringPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)
public static int readIntPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)
public static double readDoublePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)
public static boolean readBooleanPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)
public static com.google.gwt.core.client.JavaScriptObject readObjectPropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property)
object - the Object where the property will be read from.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)
public static void writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JsArrayMixed input,
boolean extractArrayContent)
object - the Object where the property will be written.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)input - an array containing the property value.extractArrayContent - It true, the first element from input array is used as property value.
public static void writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
String input)
object - the Object where the property will be written.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)input - the property value.
public static void writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
double input)
object - the Object where the property will be written.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)input - the property value.
public static void writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
boolean input)
object - the Object where the property will be written.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)input - the property value.
public static void writePropertyValue(com.google.gwt.core.client.JavaScriptObject object,
String property,
com.google.gwt.core.client.JavaScriptObject input)
object - the Object where the property will be written.property - the name of the property. You can pass inner properties using dot notation (prop1.prop2)input - the property value.public static String[] toArray(com.google.gwt.core.client.JsArrayString jSArray)
public static List<String> toList(com.google.gwt.core.client.JsArrayString jSArray)
public static FastList<String> toFastList(com.google.gwt.core.client.JsArrayString jSArray)
public static com.google.gwt.core.client.JsArrayString toJsArray(List<String> list)
public static com.google.gwt.core.client.JsArrayString toJsArray(String[] args)
public static String escape(String input)
public static String unescape(String input)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||