Had the same problem, the following works for me:

import com.google.gwt.visualization.client.DataTable;

public class MyDataTable extends DataTable {
    
   public static native MyDataTable create() /*-{
     return new $wnd.google.visualization.DataTable();
s }-*/;
    public final native void setRowProperty(int rowIndex, String name, 
String value) /*-{
    this.setRowProperty(rowIndex, name, value);
  }-*/;
    

    protected  MyDataTable() {        
    }
}

Am Mittwoch, 4. Juli 2012 19:35:39 UTC+2 schrieb JoyaleXandre:
>
> How can I do a datatable subclass of my own and integrate the 
> setRowProperty method?
>
> Le samedi 5 novembre 2011 05:34:37 UTC-4, Riccardo Govoni a écrit :
>>
>> If you want to change the color of all the boxes in the orgchart, you can 
>> use setNodeClass / setSelectedNodeClass on OrgChart.Options . If you want 
>> to customize the rendering of a single, specific box you'd have to use the 
>> GWT equivalent of setRowProperty() , which indeed appears to be missing 
>> (doh!) , but you can easily fill it with a bit of jsni code, for example by 
>> adding the following method to a datatable subclass of your own:
>>
>> public final native void setRowProperty(int rowIndex, String name, String 
>> value) /*-{
>>   this.setRowProperty(rowIndex, name, value);
>> }-*/;
>>
>> - R.
>>
>> On 4 November 2011 14:09, dhartford <[email protected] <javascript:>>wrote:
>>
>>> Hey all,
>>> I'm playing with the GWT-visualization (the GWT code wrapper one, not
>>> the raw javascript version) for 1.1.0, and trying to figure out how to
>>> programmatically change the color of an org chart box based.
>>>
>>> Trying these I'm not getting anywhere:
>>>
>>>                                               
>>>  data.setProperty(addRow,0, "allowHtml", "true");
>>>                                               
>>>  data.setProperty(addRow,0, "style", "background-color=#000000");
>>>                                               
>>>  data.setProperty(addRow,0, "nodeClass", "myblackcss");
>>>
>>> I think I want the 'setRow', but that isn't available in the GWT
>>> wrapper code atm.  How would one accomplish changing the color of one
>>> of the org chart boxes?
>>>
>>> thanks,
>>> -D
>>>
>>> --
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google Visualization API" group.
>>> To post to this group, send email to 
>>> [email protected]<javascript:>
>>> .
>>> To unsubscribe from this group, send email to 
>>> [email protected] <javascript:>.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/google-visualization-api?hl=en.
>>>
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to