}
return gwtItem;
} else if ( item instanceof MenuGroup ) {
final MenuGroup groups = (MenuGroup) item;
final Widget gwtItem;
if ( isRoot ) {
final List<Widget> widgetList = new ArrayList<Widget>();
for ( final MenuItem _item : groups.getItems() ) {
final Widget widget = makeItem( _item, false );
if ( widget != null ) {
widgetList.add( widget );
}
}
if ( widgetList.isEmpty() ) {
return null;
}
gwtItem = new DropdownButton( groups.getCaption() ) {{
setSize( MINI );
for ( final Widget _item : widgetList ) {
add( _item );
}
}};
} else {
final List<Widget> widgetList = new ArrayList<Widget>();
for ( final MenuItem _item : groups.getItems() ) {
final Widget result = makeItem( _item, false );
if ( result != null ) {
widgetList.add( result );
}
}
if ( widgetList.isEmpty() ) {
return null;
}
gwtItem = new Dropdown( groups.getCaption() ) {{
for ( final Widget widget : widgetList ) {
add( widget );
}
}};
}