org.jboss.errai.common.client.dom.Window类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中org.jboss.errai.common.client.dom.Window类的一些代码示例,展示了Window类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window类的具体详情如下:
包路径:org.jboss.errai.common.client.dom.Window
类名称:Window

Window介绍

暂无

代码示例

代码示例来源:origin: org.uberfire/uberfire-layout-editor-client

@Override
public HTMLElement createContainer() {
  Div div = (Div) Window.getDocument().createElement("div");
  return div;
}

代码示例来源:origin: org.uberfire/uberfire-commons-editor-client

/**
   * 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));
  }
}

代码示例来源:origin: org.uberfire/uberfire-security-management-client-wb

@OnMayClose
public boolean onMayClose() {
  return !roleEditorWorkflow.isDirty() ||
      Window.confirm(UsersManagementWidgetsConstants.INSTANCE.roleIsDirty());
}

代码示例来源:origin: kiegroup/appformer

@Override
public HTMLElement createContainer() {
  Div div = (Div) Window.getDocument().createElement("div");
  return div;
}

代码示例来源:origin: kiegroup/appformer

@OnMayClose
public boolean onMayClose() {
  return !groupEditorWorkflow.isDirty() ||
      Window.confirm(UsersManagementWidgetsConstants.INSTANCE.groupIsDirty());
}

代码示例来源:origin: kiegroup/appformer

/**
   * 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));
  }
}

代码示例来源:origin: org.jbpm/jbpm-wb-case-mgmt-client

protected HTMLElement createElement(String type) {
  return getDocument().createElement(type);
}

代码示例来源:origin: org.uberfire/uberfire-security-management-client-wb

@OnMayClose
public boolean onMayClose() {
  return !groupEditorWorkflow.isDirty() ||
      Window.confirm(UsersManagementWidgetsConstants.INSTANCE.groupIsDirty());
}

代码示例来源:origin: kiegroup/jbpm-wb

protected HTMLElement createElement(String type) {
  return getDocument().createElement(type);
}

代码示例来源:origin: kiegroup/appformer

@OnMayClose
public boolean onMayClose() {
  return !isDirty() ||
      Window.confirm(UsersManagementWidgetsConstants.INSTANCE.userIsDirty());
}

代码示例来源:origin: errai/errai

@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.");
}

代码示例来源:origin: kiegroup/appformer

@OnMayClose
public boolean onMayClose() {
  return !roleEditorWorkflow.isDirty() ||
      Window.confirm(UsersManagementWidgetsConstants.INSTANCE.roleIsDirty());
}

代码示例来源:origin: org.jboss.errai/errai-ui

@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.");
}

代码示例来源:origin: org.uberfire/uberfire-security-management-client-wb

@OnMayClose
public boolean onMayClose() {
  return !isDirty() ||
      Window.confirm(UsersManagementWidgetsConstants.INSTANCE.userIsDirty());
}

代码示例来源:origin: org.uberfire/uberfire-layout-editor-client

@Override
public HTMLElement createRow(LayoutRow layoutRow) {
  Div div = (Div) Window.getDocument().createElement("div");
  div.setClassName("row");
  return div;
}

代码示例来源:origin: kiegroup/appformer

@Override
public HTMLElement createRow(LayoutRow layoutRow) {
  Div div = (Div) Window.getDocument().createElement("div");
  div.setClassName("row");
  return div;
}

代码示例来源:origin: org.kie.workbench.forms/kie-wb-common-dynamic-forms-client

@Override
public HTMLElement createRow(LayoutRow layoutRow) {
  Div div = (Div) Window.getDocument().createElement("div");
  div.setClassName("row");
  return div;
}

代码示例来源:origin: kiegroup/jbpm-wb

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);
}

代码示例来源:origin: org.jbpm/jbpm-wb-process-runtime-client

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);
  }
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client

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;
}

相关文章

微信公众号

最新文章

更多

Window类方法