如何获取GWT小部件类型

时间:2012-10-23 12:53:57

标签: gwt

有没有办法获得GWT小部件的类型?

for(Widget w : widgetList)  
{  
 //if w is textbox type, read value and do something

}

1 个答案:

答案 0 :(得分:2)

for(Widget w : widgetList)
{
  if(w instanceof textbox)
        // read value and do something
}