/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "image") @Deprecated public interface ImageSubmitInput extends Input { }
@Override protected List<Statement> generateCreateInstanceStatements(final ClassStructureBuilder<?> bodyBlockBuilder, final Injectable injectable, final DependencyGraph graph, final InjectionContext injectionContext) { final List<Statement> stmts = new ArrayList<>(); final String elementVar = "element"; stmts.add(declareFinalVariable(elementVar, Element.class, loadStatic(DomGlobal.class, "document").invoke("createElement", tagName))); for (final Property property : properties) { stmts.add(loadVariable(elementVar).invoke("setAttribute", loadLiteral(property.name()), loadLiteral(property.value()))); } if (!classNames.isEmpty()) { stmts.add(loadVariable(elementVar).loadField("className") .assignValue(loadLiteral(classNames.stream().collect(joining(" "))))); } final String retValVar = "retVal"; stmts.add(declareFinalVariable(retValVar, type, invokeStatic(Js.class, "cast", loadVariable(elementVar)))); if (implementsNativeHasValueAndRequiresGeneratedInvocation(type)) { stmts.add(Stmt.invokeStatic(NativeHasValueAccessors.class, "registerAccessor", loadVariable(retValVar), createAccessorImpl(type, retValVar))); } stmts.add(loadVariable(retValVar).returnValue()); return stmts; }
@Override protected List<Statement> generateCreateInstanceStatements(final ClassStructureBuilder<?> bodyBlockBuilder, final Injectable injectable, final DependencyGraph graph, final InjectionContext injectionContext) { final List<Statement> stmts = new ArrayList<>(); final String elementVar = "element"; stmts.add(declareFinalVariable(elementVar, Element.class, loadStatic(DomGlobal.class, "document").invoke("createElement", tagName))); for (final Property property : properties) { stmts.add(loadVariable(elementVar).invoke("setAttribute", loadLiteral(property.name()), loadLiteral(property.value()))); } if (!classNames.isEmpty()) { stmts.add(loadVariable(elementVar).loadField("className") .assignValue(loadLiteral(classNames.stream().collect(joining(" "))))); } final String retValVar = "retVal"; stmts.add(declareFinalVariable(retValVar, type, invokeStatic(Js.class, "cast", loadVariable(elementVar)))); if (implementsNativeHasValueAndRequiresGeneratedInvocation(type)) { stmts.add(Stmt.invokeStatic(NativeHasValueAccessors.class, "registerAccessor", loadVariable(retValVar), createAccessorImpl(type, retValVar))); } stmts.add(loadVariable(retValVar).returnValue()); return stmts; }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "hidden") @Deprecated public interface HiddenInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "date") @Deprecated public interface DateInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "hidden") @Deprecated public interface HiddenInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "time") @Deprecated public interface TimeInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "submit") @Deprecated public interface SubmitInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "text") @Deprecated public interface PasswordInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "text") @Deprecated public interface TextInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "checkbox") @Deprecated public interface CheckboxInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "radio") @Deprecated public interface RadioInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "submit") @Deprecated public interface SubmitInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "reset") @Deprecated public interface ResetInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "time") @Deprecated public interface TimeInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "datetime-local") @Deprecated public interface DateTimeInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "number") @Deprecated public interface NumberInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "button") @Deprecated public interface ButtonInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "datetime-local") @Deprecated public interface DateTimeInput extends Input { }
/** * * @deprecated Use Elemental 2 for new development * * @author Max Barkley <mbarkley@redhat.com> * @see <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement">Web API</a> */ @JsType(isNative = true) @Element("input") @Property(name = "type", value = "checkbox") @Deprecated public interface CheckboxInput extends Input { }