2011-12-29 36 views
5

Saf GWT kullanıyorum. Her hücre için dinamik farklı araç ipuçlarını nasıl uygulayabilirim? Ya da uygulamak zorsa, arifesinde ROW için farklı araç ipucu nasıl uygulanır? teşekkürlerHücre üzerinde araç ipucu. GWT

cevap

1

bunun very good example numarasını görebilirsiniz.

ListGridField nameField = new ListGridField("countryName", "Country"); 
ListGridField governmentField = new ListGridField("government", "Government", 120); 
governmentField.setShowHover(true); 
governmentField.setHoverCustomizer(new HoverCustomizer() { 
    public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) { 
     CountryRecord countryRecord = (CountryRecord) record; 
     int governmentDesc = countryRecord.getGovernmentDesc(); 
     String[] governmentDescription = new String[]{ 
      //your data see link for more detail"" 
    }; 
     return governmentDescription[governmentDesc]; 
    } 
}); 

countryGrid.setFields(countryCodeField, nameField, governmentField); 
countryGrid.setCanResizeFields(true); 
countryGrid.setData(CountryData.getRecords()); 
canvas.addChild(countryGrid); 
+3

Bu örnek yalnızca Smart GWT'ye uygulanabilir. Saf GWT örneğine ihtiyacım var. Teşekkürler – MyTitle