use of com.google.gwt.uibinder.client.UiChild in project gwt-test-utils by gwt-test-utils.
the class UiObjectTag method collectUiChildMethods.
private Map<String, UiChildMethodHolder> collectUiChildMethods(Class<? extends T> clazz) {
Map<String, UiChildMethodHolder> map = new HashMap<String, UiObjectTag.UiChildMethodHolder>();
Map<Method, UiChild> uiChildMap = GwtReflectionUtils.getAnnotatedMethod(clazz, UiChild.class);
for (Map.Entry<Method, UiChild> entry : uiChildMap.entrySet()) {
Method method = entry.getKey();
UiChild annotation = entry.getValue();
UiChildMethodHolder holder = new UiChildMethodHolder();
holder.uiChildMethod = method;
// default is -1
holder.invocationLimit = annotation.limit();
holder.invocationCount = 0;
String tagName = (annotation.tagname().equals("")) ? computeUiChildMethodTagName(method) : annotation.tagname();
map.put(tagName, holder);
}
return map;
}
use of com.google.gwt.uibinder.client.UiChild in project gwt-test-utils by gwt-test-utils.
the class WidgetWithUiChild method addMyUiLabel.
@UiChild
void addMyUiLabel(Label l) {
FlowPanel flowPanel = (FlowPanel) this.getWidget();
flowPanel.add(l);
labels.add(l);
}
use of com.google.gwt.uibinder.client.UiChild in project gwt-test-utils by gwt-test-utils.
the class WidgetWithUiChild method uiCustomChild.
@UiChild(tagname = "customChild", limit = 1)
void uiCustomChild(Widget w) {
FlowPanel flowPanel = (FlowPanel) this.getWidget();
flowPanel.add(w);
customWidgets.add(w);
}