public class DataClass extends JsObject
Constructor and Description |
---|
DataClass() |
DataClass(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
protected <H extends com.google.gwt.event.shared.EventHandler> |
doAddHandler(H handler,
com.google.gwt.event.shared.GwtEvent.Type<H> type) |
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> event) |
java.lang.String |
getAttribute(java.lang.String property)
Returns attribute value as a String
|
java.lang.Boolean |
getAttributeAsBoolean(java.lang.String property)
Returns attribute value set as a Boolean.
|
java.lang.Boolean |
getAttributeAsBoolean(java.lang.String property,
boolean allowNull)
Returns attribute value set as a Boolean.
|
java.util.Date |
getAttributeAsDate(java.lang.String property)
Returns attribute value as a Date.
|
java.lang.Double |
getAttributeAsDouble(java.lang.String property)
Returns attribute as a Double.
|
double[] |
getAttributeAsDoubleArray(java.lang.String property)
Returns attribute as a double array.
|
java.lang.Float |
getAttributeAsFloat(java.lang.String property)
Returns attribute value as a Float.
|
java.lang.Integer |
getAttributeAsInt(java.lang.String property)
Returns attribute value as an Integer.
|
int[] |
getAttributeAsIntArray(java.lang.String property)
Returns attribute as an int array.
|
com.google.gwt.core.client.JavaScriptObject |
getAttributeAsJavaScriptObject(java.lang.String property)
Returns attribute value as a JavaScript Object.
|
java.lang.Long |
getAttributeAsLong(java.lang.String property)
Returns attribute as a Long.
|
java.util.Map |
getAttributeAsMap(java.lang.String property)
Returns attribute value as a Map.
|
java.lang.Object |
getAttributeAsObject(java.lang.String property)
Returns attribute value as a Java Object.
|
Record |
getAttributeAsRecord(java.lang.String property)
Get the attribute value as a Record.
|
java.lang.String |
getAttributeAsString(java.lang.String property)
Returns attribute value as a String.
|
java.lang.String[] |
getAttributeAsStringArray(java.lang.String property)
Returns attribute as a String array.
|
java.lang.String[] |
getAttributes() |
int |
getHandlerCount(com.google.gwt.event.shared.GwtEvent.Type<?> type) |
void |
setAttribute(java.lang.String property,
BaseClass value)
Set attribute value to a BaseClass.
|
void |
setAttribute(java.lang.String property,
BaseClass[] value)
Set attribute value to a BaseClass array.
|
void |
setAttribute(java.lang.String property,
BaseWidget[] value)
Set attribute value to a BaseWidget array.
|
void |
setAttribute(java.lang.String property,
boolean value)
Set attribute value to a boolean.
|
void |
setAttribute(java.lang.String property,
java.lang.Boolean value)
Set attribute value to a Boolean.
|
void |
setAttribute(java.lang.String property,
DataClass value)
Set attribute value to a DataClass.
|
void |
setAttribute(java.lang.String property,
DataClass[] value)
Set attribute value to a DataClass array.
|
void |
setAttribute(java.lang.String property,
java.util.Date value)
Set attribute value to a Date.
|
void |
setAttribute(java.lang.String property,
double value)
Set attribute value to a double.
|
void |
setAttribute(java.lang.String property,
java.lang.Double value)
Set attribute value to a Double.
|
void |
setAttribute(java.lang.String property,
double[] value)
Set attribute value to a double array.
|
void |
setAttribute(java.lang.String property,
java.lang.Float value)
Set attribute value to a Float.
|
void |
setAttribute(java.lang.String property,
int value)
Set attribute value to an int.
|
void |
setAttribute(java.lang.String property,
int[] value)
Set attribute value to an int array.
|
void |
setAttribute(java.lang.String property,
java.lang.Integer value)
Set attribute value to an Integer.
|
void |
setAttribute(java.lang.String property,
java.lang.Integer[] value)
Set attribute value to an Integer array.
|
void |
setAttribute(java.lang.String property,
com.google.gwt.core.client.JavaScriptObject value)
Set attribute value to a JavaScriptObject.
|
void |
setAttribute(java.lang.String property,
long value)
Set attribute value to a long.
|
void |
setAttribute(java.lang.String property,
java.util.Map value)
Set attribute value to a Map.
|
void |
setAttribute(java.lang.String property,
java.lang.Object value)
Set the attribute value to an Object.
|
void |
setAttribute(java.lang.String property,
java.lang.String value)
Set attribute value to a String
|
void |
setAttribute(java.lang.String property,
java.lang.String[] value)
Set attribute value to a String array.
|
void |
setAttribute(java.lang.String property,
ValueEnum value)
Set attribute value to a ValueEnum.
|
void |
setAttribute(java.lang.String property,
ValueEnum[] value)
Set attribute value to a ValueEnum array.
|
void |
setAttributeAsJavaObject(java.lang.String property,
java.lang.Object value)
Set the attribute value to an Object.
|
public DataClass()
public DataClass(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setAttribute(java.lang.String property, java.lang.String value)
property
- value
- public java.lang.String getAttribute(java.lang.String property)
property
- public java.lang.String getAttributeAsString(java.lang.String property)
property
- public java.lang.Integer getAttributeAsInt(java.lang.String property)
property
- public java.lang.Boolean getAttributeAsBoolean(java.lang.String property)
getAttributeAsBoolean
will return Boolean false
if the attribute value is null
or not a Boolean. Use the two parameter
variant of this API getAttributeAsBoolean(String, boolean)
if you want
null
returned for null
attribute values.property
- the property namepublic java.lang.Boolean getAttributeAsBoolean(java.lang.String property, 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 one parameter variant of this API
getAttributeAsBoolean(String)
.property
- the property nameallowNull
- whether to allow nullpublic java.lang.Double getAttributeAsDouble(java.lang.String property)
property
- public java.lang.Long getAttributeAsLong(java.lang.String property)
property
- public double[] getAttributeAsDoubleArray(java.lang.String property)
property
- public void setAttribute(java.lang.String property, DataClass[] value)
property
- value
- public void setAttribute(java.lang.String property, BaseClass[] value)
property
- value
- public void setAttribute(java.lang.String property, BaseWidget[] value)
property
- value
- public int[] getAttributeAsIntArray(java.lang.String property)
property
- public void setAttribute(java.lang.String property, java.lang.String[] value)
property
- value
- public java.lang.String[] getAttributeAsStringArray(java.lang.String property)
property
- public void setAttribute(java.lang.String property, DataClass value)
property
- value
- public void setAttribute(java.lang.String property, BaseClass value)
property
- value
- public void setAttribute(java.lang.String property, com.google.gwt.core.client.JavaScriptObject value)
property
- value
- public void setAttribute(java.lang.String property, java.util.Date value)
property
- value
- public void setAttribute(java.lang.String property, java.util.Map value)
property
- value
- public void setAttribute(java.lang.String property, ValueEnum[] value)
property
- value
- public void setAttribute(java.lang.String property, ValueEnum value)
property
- value
- public void setAttribute(java.lang.String property, java.lang.Object value)
The values provided as attributes are generally expected to contain valid values for a field
of a DataBoundComponent. Therefore this method converts the value passed in to an equivalent object in JavaScript before
storing on underlying data object.
Developers can use setAttributeAsJavaObject(String, Object)
to store Java objects
without converting to JavaScript.
Conversions that occur include:
getAttributeAsObject(String)
.property
- the attribute namevalue
- the attribute value.public void setAttributeAsJavaObject(java.lang.String property, java.lang.Object value)
Unlike setAttribute(String, Object)
, this method will store the value passed in as-is
rather than converting to an equivalent object in JavaScript.
property
- value
- public void setAttribute(java.lang.String property, boolean value)
property
- value
- public void setAttribute(java.lang.String property, java.lang.Boolean value)
property
- value
- public void setAttribute(java.lang.String property, int value)
property
- value
- public void setAttribute(java.lang.String property, java.lang.Integer value)
property
- value
- public void setAttribute(java.lang.String property, long value)
property
- value
- public void setAttribute(java.lang.String property, java.lang.Float value)
property
- value
- public void setAttribute(java.lang.String property, double value)
property
- value
- public void setAttribute(java.lang.String property, java.lang.Double value)
property
- value
- public void setAttribute(java.lang.String property, int[] value)
property
- value
- public void setAttribute(java.lang.String property, java.lang.Integer[] value)
property
- value
- public void setAttribute(java.lang.String property, double[] value)
property
- value
- public java.lang.Float getAttributeAsFloat(java.lang.String property)
property
- public java.util.Date getAttributeAsDate(java.lang.String property)
property
- public java.lang.Object getAttributeAsObject(java.lang.String property)
If the attribute has been set as a Java Object (typically via a call to
setAttributeAsJavaObject(String, Object)
) it will be returned as is.
Values specified as JavaScript types will be converted to the equivalent Java type if possible.
property
- public java.util.Map getAttributeAsMap(java.lang.String property)
property
- public Record getAttributeAsRecord(java.lang.String property)
property
- the property namepublic com.google.gwt.core.client.JavaScriptObject getAttributeAsJavaScriptObject(java.lang.String property)
property
- public java.lang.String[] getAttributes()
public void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
protected final <H extends com.google.gwt.event.shared.EventHandler> com.google.gwt.event.shared.HandlerRegistration doAddHandler(H handler, com.google.gwt.event.shared.GwtEvent.Type<H> type)
public int getHandlerCount(com.google.gwt.event.shared.GwtEvent.Type<?> type)