@Override public HTMLElement createContainer() { Div div = (Div) Window.getDocument().createElement("div"); return div; }
/** * Creates a Blob instance for the raw image data-uri value. * @param data The image uri data. * @param mimeType The media type for the generated blob. */ public static Blob dataImageAsBlob(final String data, final String mimeType) { final String byteString = Window.atob(data); final ArrayBuffer buffer = ArrayBufferNative.create(byteString.length()); final Uint8Array ia = Uint8ArrayNative.create(buffer); for (int i = 0; i < byteString.length(); i++) { ia.set(i, byteString.charAt(i)); } return new BlobImpl(new Object[]{ia}, BlobPropertyBag.create(mimeType)); } }
@OnMayClose public boolean onMayClose() { return !roleEditorWorkflow.isDirty() || Window.confirm(UsersManagementWidgetsConstants.INSTANCE.roleIsDirty()); }
@Override public HTMLElement createContainer() { Div div = (Div) Window.getDocument().createElement("div"); return div; }
@OnMayClose public boolean onMayClose() { return !groupEditorWorkflow.isDirty() || Window.confirm(UsersManagementWidgetsConstants.INSTANCE.groupIsDirty()); }
/** * Creates a Blob instance for the raw image data-uri value. * @param data The image uri data. * @param mimeType The media type for the generated blob. */ public static Blob dataImageAsBlob(final String data, final String mimeType) { final String byteString = Window.atob(data); final ArrayBuffer buffer = ArrayBufferNative.create(byteString.length()); final Uint8Array ia = Uint8ArrayNative.create(buffer); for (int i = 0; i < byteString.length(); i++) { ia.set(i, byteString.charAt(i)); } return new BlobImpl(new Object[]{ia}, BlobPropertyBag.create(mimeType)); } }
protected HTMLElement createElement(String type) { return getDocument().createElement(type); }
@OnMayClose public boolean onMayClose() { return !groupEditorWorkflow.isDirty() || Window.confirm(UsersManagementWidgetsConstants.INSTANCE.groupIsDirty()); }
protected HTMLElement createElement(String type) { return getDocument().createElement(type); }
@OnMayClose public boolean onMayClose() { return !isDirty() || Window.confirm(UsersManagementWidgetsConstants.INSTANCE.userIsDirty()); }
@Override public HTMLElement provide(final Class<?>[] typeargs, final Annotation[] qualifiers) { for (final Annotation anno : qualifiers) { if (anno.annotationType().equals(Named.class)) { final String tagName = ((Named) anno).value(); try { return Window.getDocument().createElement(tagName); } catch (Throwable t) { throw new RuntimeException("An error occurred while attempting to create an element with the tag name [" + tagName + "].", t); } } } throw new RuntimeException( "Cannot provide an HTMLELement for an injection point of HTMLElement without a @Named qualifier specifying the tag name."); }
@OnMayClose public boolean onMayClose() { return !roleEditorWorkflow.isDirty() || Window.confirm(UsersManagementWidgetsConstants.INSTANCE.roleIsDirty()); }
@Override public HTMLElement provide(final Class<?>[] typeargs, final Annotation[] qualifiers) { for (final Annotation anno : qualifiers) { if (anno.annotationType().equals(Named.class)) { final String tagName = ((Named) anno).value(); try { return Window.getDocument().createElement(tagName); } catch (Throwable t) { throw new RuntimeException("An error occurred while attempting to create an element with the tag name [" + tagName + "].", t); } } } throw new RuntimeException( "Cannot provide an HTMLELement for an injection point of HTMLElement without a @Named qualifier specifying the tag name."); }
@OnMayClose public boolean onMayClose() { return !isDirty() || Window.confirm(UsersManagementWidgetsConstants.INSTANCE.userIsDirty()); }
@Override public HTMLElement createRow(LayoutRow layoutRow) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName("row"); return div; }
@Override public HTMLElement createRow(LayoutRow layoutRow) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName("row"); return div; }
@Override public HTMLElement createRow(LayoutRow layoutRow) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName("row"); return div; }
private <T extends Object> void createTextInput(final String label, final String placeholder, final Boolean hidden, final Consumer<Input> customizeCallback, final Function<String, T> valueMapper, final Consumer<ActiveFilterItem<T>> callback) { final Input input = (Input) getDocument().createElement("input"); createInput(label, input, placeholder, hidden, customizeCallback, valueMapper, callback); }
public void addAction(final EventListener<MouseEvent> onclick, final String label) { final HTMLElement a = getDocument().createElement("a"); a.setTextContent(label); a.setOnclick(onclick); final HTMLElement li = getDocument().createElement("li"); li.appendChild(a); actionsItems.appendChild(li); } }
private Option newOption(final String text, final String value) { final Option option = (Option) Window.getDocument().createElement("option"); option.setTextContent(text); option.setValue(value); return option; }