com.threerings.presents.tools.dobject_field.tmpl Maven / Gradle / Ivy
/**
* Requests that the {{field}}
field be set to the
* specified value. The local value will be updated immediately and an
* event will be propagated through the system to notify all listeners
* that the attribute did change. Proxied copies of this object (on
* clients) will apply the value change when they received the
* attribute changed notification.
*/
{{generated}}
public void set{{upfield}} ({{type}} value)
{
{{type}} ovalue = this.{{field}};
requestAttributeChange(
{{capfield}}, {{wrapfield}}, {{wrapofield}}{{transport}});
this.{{field}} = {{clonefield}};
}
{{#have_elem}}
/**
* Requests that the index
th element of
* {{field}}
field be set to the specified value.
* The local value will be updated immediately and an event will be
* propagated through the system to notify all listeners that the
* attribute did change. Proxied copies of this object (on clients)
* will apply the value change when they received the attribute
* changed notification.
*/
{{generated}}
public void set{{upfield}}At ({{elemtype}} value, int index)
{
{{elemtype}} ovalue = this.{{field}}[index];
requestElementUpdate(
{{capfield}}, index, {{wrapelem}}, {{wrapoelem}}{{transport}});
this.{{field}}[index] = value;
}
{{/have_elem}}