use of com.google.gwt.user.client.ui.HTML in project gwt-test-utils by gwt-test-utils.
the class HTMLTest method getHTML.
@Test
public void getHTML() {
// Given
HTML html = new HTML("<a href='#'>link</a><br/>test test");
// When
String result = html.getHTML();
// Then
assertThat(result).isEqualTo("<a href=\"#\">link</a><br>test test");
}
use of com.google.gwt.user.client.ui.HTML in project kie-wb-common by kiegroup.
the class IntegerBoxFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
Widget widget;
String inputId = generateUniqueId();
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
widget = new HTML();
widget.getElement().setId(inputId);
} else {
integerBox.setId(inputId);
integerBox.setPlaceholder(field.getPlaceHolder());
integerBox.setMaxLength(field.getMaxLength());
integerBox.setEnabled(!field.getReadOnly());
widget = integerBox.asWidget();
}
DefaultFormGroup formGroup = formGroupsInstance.get();
formGroup.render(inputId, widget, field);
registerFieldRendererPart(widget);
return formGroup;
}
use of com.google.gwt.user.client.ui.HTML in project kie-wb-common by kiegroup.
the class AbstractListBoxFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
DefaultFormGroup formGroup = formGroupsInstance.get();
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
formGroup.render(new HTML(), field);
} else {
String inputId = generateUniqueId();
widgetList.setId(inputId);
widgetList.setName(fieldNS);
widgetList.setEnabled(!field.getReadOnly());
refreshSelectorOptions();
formGroup.render(inputId, widgetList, field);
registerFieldRendererPart(widgetList);
}
return formGroup;
}
use of com.google.gwt.user.client.ui.HTML in project kie-wb-common by kiegroup.
the class DecimalBoxFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
DefaultFormGroup formGroup = formGroupsInstance.get();
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
formGroup.render(new HTML(), field);
} else {
String inputId = generateUniqueId();
decimalBox.setId(inputId);
decimalBox.setPlaceholder(field.getPlaceHolder());
decimalBox.setMaxLength(field.getMaxLength());
decimalBox.setEnabled(!field.getReadOnly());
formGroup.render(inputId, decimalBox.asWidget(), field);
registerFieldRendererPart(decimalBox);
}
return formGroup;
}
use of com.google.gwt.user.client.ui.HTML in project cuba by cuba-platform.
the class CubaTwinColSelectWidget method enableAddAllBtn.
protected void enableAddAllBtn() {
HTML br1 = new HTML("<span/>");
br1.setStyleName(CLASSNAME + "-deco");
buttons.add(br1);
buttons.insert(br1, buttons.getWidgetIndex(addItemsLeftToRightButton) + 1);
addAll = new VButton();
addAll.setText(">>");
addAll.addStyleName("addAll");
addAllHandlerRegistration = addAll.addClickHandler(this);
buttons.insert(addAll, buttons.getWidgetIndex(br1) + 1);
HTML br2 = new HTML("<span/>");
br2.setStyleName(CLASSNAME + "-deco");
buttons.add(br2);
removeAll = new VButton();
removeAll.setText("<<");
removeAll.addStyleName("removeAll");
removeAllHandlerRegistration = removeAll.addClickHandler(this);
buttons.add(removeAll);
}
Aggregations