Added more useful methods in WidgetUtil class.