public class JSOHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addProperties(com.google.gwt.core.client.JavaScriptObject destination,
com.google.gwt.core.client.JavaScriptObject propertiesObject)
Adds all properties and methods from the propertiesObject to the destination object.
|
static void |
apply(com.google.gwt.core.client.JavaScriptObject config,
com.google.gwt.core.client.JavaScriptObject jsObj) |
static com.google.gwt.core.client.JavaScriptObject |
arrayConvert(com.google.gwt.core.client.JavaScriptObject[] array) |
static com.google.gwt.core.client.JavaScriptObject |
arrayConvert(java.lang.Object[] array) |
static java.lang.Object |
arrayGetObject(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static int |
arrayLength(com.google.gwt.core.client.JavaScriptObject array) |
static void |
arraySet(com.google.gwt.core.client.JavaScriptObject array,
int index,
com.google.gwt.core.client.JavaScriptObject value) |
static void |
arraySet(com.google.gwt.core.client.JavaScriptObject array,
int index,
java.lang.Object value) |
static com.google.gwt.core.client.JavaScriptObject |
cleanProperties(com.google.gwt.core.client.JavaScriptObject properties,
boolean copyProperties)
Removes non-transferable properties from the supplied object
(e.g.
|
static com.google.gwt.core.client.JavaScriptObject |
convertMapToJavascriptObject(java.util.Map valueMap) |
static com.google.gwt.core.client.JavaScriptObject |
convertMapToJavascriptObject(java.util.Map valueMap,
boolean strict) |
static java.lang.Object[] |
convertToArray(com.google.gwt.core.client.JavaScriptObject object)
Convert a Javascript object to an Object[].
|
static com.google.gwt.core.client.JavaScriptObject |
convertToCellArray(int[][] cells) |
static java.lang.Object |
convertToJava(com.google.gwt.core.client.JavaScriptObject object) |
static java.lang.Object |
convertToJava(com.google.gwt.core.client.JavaScriptObject object,
boolean listAsArray)
Convert a JavaScriptObject to the appropriate type of JavaObject.
|
static java.util.Date |
convertToJavaDate(com.google.gwt.core.client.JavaScriptObject val) |
static java.util.Date[] |
convertToJavaDateArray(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.Double[] |
convertToJavaDoubleArray(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.Float[] |
convertToJavaFloatArray(com.google.gwt.core.client.JavaScriptObject array) |
static int[] |
convertToJavaIntArray(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.Integer[] |
convertToJavaInterArray(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.Object[] |
convertToJavaObjectArray(com.google.gwt.core.client.JavaScriptObject array) |
static RefDataClass[] |
convertToJavaRefDataClassArray(com.google.gwt.core.client.JavaScriptObject nativeArray) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(boolean[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(byte[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(char[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(double[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(float[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(int[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(long[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(java.lang.Object[] array) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(java.lang.Object[] array,
boolean strict) |
static com.google.gwt.core.client.JavaScriptObject |
convertToJavaScriptArray(short[] array) |
static com.google.gwt.core.client.JsDate |
convertToJavaScriptDate(java.util.Date date) |
static java.lang.String[] |
convertToJavaStringArray(com.google.gwt.core.client.JavaScriptObject array) |
static <O extends com.google.gwt.core.client.JavaScriptObject> |
convertToJsArray(O[] array) |
static java.util.List |
convertToList(com.google.gwt.core.client.JavaScriptObject object)
Convert a Javascript object to a List.
|
static java.util.Map |
convertToMap(com.google.gwt.core.client.JavaScriptObject jsObj)
Convert a Javascript object containing key:value pairs to a Map.
|
static java.util.Map |
convertToMap(com.google.gwt.core.client.JavaScriptObject jsObj,
boolean listAsArray)
Convert a Javascript object containing key:value pairs to a Map.
|
static java.lang.String |
convertToString(java.lang.Object obj) |
static com.google.gwt.core.client.JavaScriptObject |
createJavaScriptArray() |
static com.google.gwt.core.client.JavaScriptObject |
createObject() |
static void |
deleteAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static void |
deleteAttributeIfExists(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static double |
doubleValue(java.lang.Number num) |
static com.google.gwt.core.client.JavaScriptObject |
eval(java.lang.String jsFrag)
Evaluate the passed string as Javascript
|
static int |
getArrayLength(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.String |
getArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static java.lang.String |
getAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static boolean |
getAttributeAsBoolean(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr)
Returns attribute value set as a Boolean.
|
static java.lang.Boolean |
getAttributeAsBoolean(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
boolean allowNull)
Returns attribute value set as a Boolean.
|
static java.util.Date |
getAttributeAsDate(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static java.lang.Double |
getAttributeAsDouble(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static double[] |
getAttributeAsDoubleArray(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static com.google.gwt.user.client.Element |
getAttributeAsElement(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static java.lang.Float |
getAttributeAsFloat(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static java.lang.Integer |
getAttributeAsInt(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static int[] |
getAttributeAsIntArray(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static com.google.gwt.core.client.JavaScriptObject |
getAttributeAsJavaScriptObject(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static com.google.gwt.core.client.JavaScriptObject[] |
getAttributeAsJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static java.util.Map |
getAttributeAsMap(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static java.lang.Object |
getAttributeAsObject(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static java.lang.String[] |
getAttributeAsStringArray(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static int[][] |
getCellArray(com.google.gwt.core.client.JavaScriptObject jsCells) |
static java.lang.String |
getClassName(com.google.gwt.core.client.JavaScriptObject javaScriptObject)
Returns the javascript class name.
|
static java.util.Date |
getDateArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int i) |
static double |
getdoubleArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static java.lang.Double |
getDoubleArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static double |
getDoubleValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem,
int i) |
static com.google.gwt.user.client.Element |
getElementValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem,
int i)
This is used to access Element array as JavaScriptObject
|
static float |
getfloatArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static java.lang.Float |
getFloatArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static int |
getIntArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static java.lang.Integer |
getIntegerArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static int |
getIntValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem,
int i) |
static int |
getJavaScriptObjectArraySize(com.google.gwt.core.client.JavaScriptObject elem) |
static com.google.gwt.core.client.JsDate |
getJSLogicalDate(java.util.Date date) |
static com.google.gwt.core.client.JsDate |
getJSLogicalDate(int year,
int month,
int date) |
static com.google.gwt.core.client.JsDate |
getJSLogicalTime(java.util.Date date) |
static com.google.gwt.core.client.JsDate |
getJSLogicalTime(int hour,
int minute,
int second,
int millisecond) |
static com.google.gwt.core.client.JavaScriptObject |
getJSOArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static java.lang.Object |
getObjectArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index) |
static java.lang.String[] |
getProperties(com.google.gwt.core.client.JavaScriptObject jsObj) |
static java.lang.String |
getPropertiesAsString(com.google.gwt.core.client.JavaScriptObject jsObj) |
static java.lang.String |
getStringValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem,
int i) |
static com.google.gwt.core.client.JavaScriptObject |
getValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem,
int i) |
static boolean |
isArray(com.google.gwt.core.client.JavaScriptObject jsObj) |
static boolean |
isJavaBoolean(java.lang.Object obj) |
static boolean |
isJavaDate(java.lang.Object obj) |
static boolean |
isJavaDouble(java.lang.Object obj) |
static boolean |
isJavaFloat(java.lang.Object obj) |
static boolean |
isJavaInteger(java.lang.Object obj) |
static boolean |
isJavaList(java.lang.Object obj) |
static boolean |
isJavaMap(java.lang.Object obj) |
static boolean |
isJavaNumber(java.lang.Object obj) |
static boolean |
isJavaString(java.lang.Object obj) |
static boolean |
isJSO(java.lang.Object object) |
static boolean |
isScClassInstance(com.google.gwt.core.client.JavaScriptObject javaScriptObject)
Returns whether the supplied JavaScriptObject is a SmartClient class instance.
|
static boolean |
isScClassObject(com.google.gwt.core.client.JavaScriptObject javaScriptObject)
Returns whether the supplied JavaScriptObject is a SmartClient class (a Class object
itself, rather than an instance of a class).
|
static com.google.gwt.core.client.JavaScriptObject[] |
listToArray(java.util.List list) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
boolean value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
char value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
java.util.Date value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
double value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
com.google.gwt.core.client.JavaScriptObject value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
long value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
java.lang.Object value) |
static void |
setArrayValue(com.google.gwt.core.client.JavaScriptObject array,
int index,
java.lang.String value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
boolean value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Boolean value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Boolean[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.util.Date value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.util.Date[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
double value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
double[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Double[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
float[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Float[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
Function handler) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
int value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
int[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Integer[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
com.google.gwt.core.client.JavaScriptObject value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
com.google.gwt.core.client.JavaScriptObject[] value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Long value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Long[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject jsObj,
java.lang.String attr,
java.util.Map valueMap) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Number value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Object value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.String value) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.String[] values) |
static void |
setAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
ValueEnum[] values) |
static void |
setNullAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr) |
static void |
setObjectAttribute(com.google.gwt.core.client.JavaScriptObject elem,
java.lang.String attr,
java.lang.Object object) |
static void |
throwUnconvertibleObjectException(java.lang.Object object,
java.lang.String messageDetail) |
static com.google.gwt.core.client.JavaScriptObject[] |
toArray(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.Boolean |
toBoolean(boolean value) |
static java.util.Date |
toDate(double millis)
Converts a time to a Java
Date object. |
static com.google.gwt.core.client.JavaScriptObject |
toDateJS(java.util.Date date) |
static java.lang.Double |
toDouble(double value) |
static com.google.gwt.user.client.Element[] |
toElementArray(com.google.gwt.core.client.JavaScriptObject array) |
static java.lang.Float |
toFloat(float value) |
static java.lang.Integer |
toInteger(int value) |
static java.lang.Long |
toLong(double value) |
public static java.lang.String getClassName(com.google.gwt.core.client.JavaScriptObject javaScriptObject)
public static boolean isScClassInstance(com.google.gwt.core.client.JavaScriptObject javaScriptObject)
the
- object to evaluatepublic static boolean isScClassObject(com.google.gwt.core.client.JavaScriptObject javaScriptObject)
the
- object to evaluatepublic static com.google.gwt.core.client.JavaScriptObject eval(java.lang.String jsFrag)
jsFrag
- the string to evaluatepublic static boolean isJSO(java.lang.Object object)
public static double doubleValue(java.lang.Number num)
public static java.lang.String getAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.String value)
public static com.google.gwt.core.client.JavaScriptObject getAttributeAsJavaScriptObject(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static com.google.gwt.core.client.JavaScriptObject[] getAttributeAsJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static com.google.gwt.core.client.JavaScriptObject[] toArray(com.google.gwt.core.client.JavaScriptObject array)
public static boolean isArray(com.google.gwt.core.client.JavaScriptObject jsObj)
public static com.google.gwt.user.client.Element[] toElementArray(com.google.gwt.core.client.JavaScriptObject array)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, com.google.gwt.core.client.JavaScriptObject[] value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, int[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, float[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, double[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.String[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Integer[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Float[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Boolean[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Double[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Long[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.util.Date[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, ValueEnum[] values)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Object value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, com.google.gwt.core.client.JavaScriptObject value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, int value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Number value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Long value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Boolean value)
public static void setNullAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static void deleteAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static void deleteAttributeIfExists(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, boolean value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, double value)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, Function handler)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.util.Date value)
public static void setObjectAttribute(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, java.lang.Object object)
public static com.google.gwt.user.client.Element getAttributeAsElement(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static java.lang.Integer getAttributeAsInt(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static java.lang.Double getAttributeAsDouble(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static java.util.Date getAttributeAsDate(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static java.lang.Float getAttributeAsFloat(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static int[] getAttributeAsIntArray(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static double[] getAttributeAsDoubleArray(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static java.lang.String[] getAttributeAsStringArray(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static int getJavaScriptObjectArraySize(com.google.gwt.core.client.JavaScriptObject elem)
public static int getIntValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem, int i)
public static double getDoubleValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem, int i)
public static java.lang.String getStringValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem, int i)
public static com.google.gwt.core.client.JavaScriptObject getValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem, int i)
public static int[][] getCellArray(com.google.gwt.core.client.JavaScriptObject jsCells)
public static com.google.gwt.core.client.JavaScriptObject convertToCellArray(int[][] cells)
public static boolean getAttributeAsBoolean(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
getAttributeAsBoolean
will return Boolean false
if the attribute value is null
or not a Boolean. Use the three parameter
variant of this API getAttributeAsBoolean(JavaScriptObject, String, boolean)
if you want null
returned for null
attribute values.elem
- the JavaScriptObject containing the propertyattr
- the property namepublic static java.lang.Boolean getAttributeAsBoolean(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr, boolean allowNull)
null
or not a Boolean, the return value depends upon allowNull
. If
allowNull
is true, null
will be returned; otherwise Boolean
false
will be returned. For a simpler approach that never returns
null
, use the two parameter variant of this API
getAttributeAsBoolean(JavaScriptObject, String)
.elem
- the JavaScriptObject containing the propertyattr
- the property nameallowNull
- whether to permit a null
return valuepublic static java.lang.Object getAttributeAsObject(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static java.util.Map getAttributeAsMap(com.google.gwt.core.client.JavaScriptObject elem, java.lang.String attr)
public static com.google.gwt.core.client.JavaScriptObject[] listToArray(java.util.List list)
public static com.google.gwt.core.client.JavaScriptObject arrayConvert(java.lang.Object[] array)
public static com.google.gwt.core.client.JavaScriptObject arrayConvert(com.google.gwt.core.client.JavaScriptObject[] array)
public static int arrayLength(com.google.gwt.core.client.JavaScriptObject array)
public static java.lang.Object arrayGetObject(com.google.gwt.core.client.JavaScriptObject array, int index)
public static void arraySet(com.google.gwt.core.client.JavaScriptObject array, int index, java.lang.Object value)
public static void arraySet(com.google.gwt.core.client.JavaScriptObject array, int index, com.google.gwt.core.client.JavaScriptObject value)
public static com.google.gwt.user.client.Element getElementValueFromJavaScriptObjectArray(com.google.gwt.core.client.JavaScriptObject elem, int i)
public static com.google.gwt.core.client.JavaScriptObject createObject()
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(boolean[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(char[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(byte[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(short[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(int[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(float[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(double[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(long[] array)
public static java.lang.Object convertToJava(com.google.gwt.core.client.JavaScriptObject object, boolean listAsArray)
object
- JavaScriptObject to convertlistAsArray
- Should arrays be converted to Object[] or Listpublic static java.lang.Object convertToJava(com.google.gwt.core.client.JavaScriptObject object)
public static java.util.Map convertToMap(com.google.gwt.core.client.JavaScriptObject jsObj, boolean listAsArray)
jsObj
- the javascript objectlistAsArray
- Should arrays be converted to Object[] or Listjava.lang.IllegalArgumentException
- if unable to convert the passed JavaScript object to a mappublic static java.util.Map convertToMap(com.google.gwt.core.client.JavaScriptObject jsObj)
jsObj
- the javascript objectjava.lang.IllegalArgumentException
- if unable to convert pass JavaScript object to a mappublic static java.lang.Object[] convertToArray(com.google.gwt.core.client.JavaScriptObject object)
object
- public static java.util.List convertToList(com.google.gwt.core.client.JavaScriptObject object)
object
- public static com.google.gwt.core.client.JsDate convertToJavaScriptDate(java.util.Date date)
public static java.util.Date convertToJavaDate(com.google.gwt.core.client.JavaScriptObject val)
public static java.lang.String convertToString(java.lang.Object obj)
public static boolean isJavaDate(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaNumber(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaInteger(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaFloat(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaDouble(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaString(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaBoolean(java.lang.Object obj)
obj
- the objectpublic static boolean isJavaList(java.lang.Object obj)
public static boolean isJavaMap(java.lang.Object obj)
public static <O extends com.google.gwt.core.client.JavaScriptObject> com.google.gwt.core.client.JsArray<O> convertToJsArray(O[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(java.lang.Object[] array)
public static com.google.gwt.core.client.JavaScriptObject convertToJavaScriptArray(java.lang.Object[] array, boolean strict)
public static void throwUnconvertibleObjectException(java.lang.Object object, java.lang.String messageDetail)
public static java.lang.Integer toInteger(int value)
public static java.lang.Long toLong(double value)
public static java.lang.Float toFloat(float value)
public static java.lang.Double toDouble(double value)
public static java.util.Date toDate(double millis)
Date
object.
Note: If needing to convert a JavaScript object, it is preferable to use
convertToJavaDate(JavaScriptObject)
instead because that function is able to
convert to LogicalDate
and LogicalTime
instances as needed.
millis
- number of milliseconds since January 1, 1970, 00:00:00 GMT.Date
representing the given time.public static com.google.gwt.core.client.JavaScriptObject toDateJS(java.util.Date date)
public static com.google.gwt.core.client.JsDate getJSLogicalDate(java.util.Date date)
public static com.google.gwt.core.client.JsDate getJSLogicalDate(int year, int month, int date)
public static com.google.gwt.core.client.JsDate getJSLogicalTime(java.util.Date date)
public static com.google.gwt.core.client.JsDate getJSLogicalTime(int hour, int minute, int second, int millisecond)
public static java.lang.Boolean toBoolean(boolean value)
public static com.google.gwt.core.client.JavaScriptObject createJavaScriptArray()
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, java.util.Date value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, java.lang.String value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, double value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, long value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, boolean value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, char value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, com.google.gwt.core.client.JavaScriptObject value)
public static void setArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index, java.lang.Object value)
public static java.lang.String getArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static com.google.gwt.core.client.JavaScriptObject getJSOArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static java.lang.Object getObjectArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static int getIntArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static float getfloatArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static double getdoubleArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static java.lang.Integer getIntegerArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static java.lang.Float getFloatArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static java.lang.Double getDoubleArrayValue(com.google.gwt.core.client.JavaScriptObject array, int index)
public static java.util.Date getDateArrayValue(com.google.gwt.core.client.JavaScriptObject array, int i)
public static int getArrayLength(com.google.gwt.core.client.JavaScriptObject array)
public static int[] convertToJavaIntArray(com.google.gwt.core.client.JavaScriptObject array)
public static java.lang.Integer[] convertToJavaInterArray(com.google.gwt.core.client.JavaScriptObject array)
public static java.lang.String[] convertToJavaStringArray(com.google.gwt.core.client.JavaScriptObject array)
public static java.lang.Float[] convertToJavaFloatArray(com.google.gwt.core.client.JavaScriptObject array)
public static java.lang.Double[] convertToJavaDoubleArray(com.google.gwt.core.client.JavaScriptObject array)
public static java.util.Date[] convertToJavaDateArray(com.google.gwt.core.client.JavaScriptObject array)
public static java.lang.Object[] convertToJavaObjectArray(com.google.gwt.core.client.JavaScriptObject array)
public static RefDataClass[] convertToJavaRefDataClassArray(com.google.gwt.core.client.JavaScriptObject nativeArray)
public static void apply(com.google.gwt.core.client.JavaScriptObject config, com.google.gwt.core.client.JavaScriptObject jsObj)
public static void setAttribute(com.google.gwt.core.client.JavaScriptObject jsObj, java.lang.String attr, java.util.Map valueMap)
public static com.google.gwt.core.client.JavaScriptObject convertMapToJavascriptObject(java.util.Map valueMap)
public static com.google.gwt.core.client.JavaScriptObject convertMapToJavascriptObject(java.util.Map valueMap, boolean strict)
public static java.lang.String[] getProperties(com.google.gwt.core.client.JavaScriptObject jsObj)
public static java.lang.String getPropertiesAsString(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void addProperties(com.google.gwt.core.client.JavaScriptObject destination, com.google.gwt.core.client.JavaScriptObject propertiesObject)
destination
- the destination objectpropertiesObject
- the propertiesObjectpublic static com.google.gwt.core.client.JavaScriptObject cleanProperties(com.google.gwt.core.client.JavaScriptObject properties, boolean copyProperties)
properties
- the supplied object to cleancopyProperties
- whether to copy the object first