/** * Assert that the given {@link Element} is compatible with this class and * automatically typecast it. */ public static TextAreaElement as(Element elem) { assert is(elem); return (TextAreaElement) elem; }
/** * Determine whether the given {@link Node} can be cast to this class. * A <code>null</code> node will cause this method to return * <code>false</code>. */ public static boolean is(Node node) { if (Element.is(node)) { return is((Element) node); } return false; }
/** * Determines whether the given {@link JavaScriptObject} can be cast to * this class. A <code>null</code> object will cause this method to * return <code>false</code>. */ public static boolean is(JavaScriptObject o) { if (Element.is(o)) { return is((Element) o); } return false; }
/** * Assert that the given {@link Element} is compatible with this class and * automatically typecast it. */ public static TextAreaElement as(Element elem) { assert is(elem); return (TextAreaElement) elem; }
/** * Assert that the given {@link Element} is compatible with this class and * automatically typecast it. */ public static TextAreaElement as(Element elem) { assert is(elem); return (TextAreaElement) elem; }
/** * Determines whether the given {@link JavaScriptObject} can be cast to * this class. A <code>null</code> object will cause this method to * return <code>false</code>. */ public static boolean is(JavaScriptObject o) { if (Element.is(o)) { return is((Element) o); } return false; }
/** * Determine whether the given {@link Node} can be cast to this class. * A <code>null</code> node will cause this method to return * <code>false</code>. */ public static boolean is(Node node) { if (Element.is(node)) { return is((Element) node); } return false; }
/** * Determines whether the given {@link JavaScriptObject} can be cast to * this class. A <code>null</code> object will cause this method to * return <code>false</code>. */ public static boolean is(JavaScriptObject o) { if (Element.is(o)) { return is((Element) o); } return false; }
/** * Determine whether the given {@link Node} can be cast to this class. * A <code>null</code> node will cause this method to return * <code>false</code>. */ public static boolean is(Node node) { if (Element.is(node)) { return is((Element) node); } return false; }
componentValueType = Optional.ofNullable(ElementWrapperWidget.getValueClassForInputType(element.getPropertyString("type"))); else if (TextAreaElement.is(element)) { componentValueType = Optional.ofNullable(String.class);
componentValueType = Optional.ofNullable(ElementWrapperWidget.getValueClassForInputType(element.getPropertyString("type"))); else if (TextAreaElement.is(element)) { componentValueType = Optional.ofNullable(String.class);
@SuppressWarnings({ "rawtypes", "unchecked" }) private static ElementWrapperWidget<?> createElementWrapperWidget(final Element element, final Class<?> valueType) { if (valueType != null) { final Accessor accessor; if (NativeHasValueAccessors.hasValueAccessor(element)) { accessor = NativeHasValueAccessors.getAccessor(element); } else { accessor = new DefaultAccessor((org.jboss.errai.common.client.ui.HasValue) element); } return new JsTypeHasValueElementWrapperWidget<>(element, accessor, valueType); } else if (InputElement.is(element) || TextAreaElement.is(element)) { return new InputElementWrapperWidget<>(element); } else { return new DefaultElementWrapperWidget<>(element); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) private static ElementWrapperWidget<?> createElementWrapperWidget(final Element element, final Class<?> valueType) { if (valueType != null) { final Accessor accessor; if (NativeHasValueAccessors.hasValueAccessor(element)) { accessor = NativeHasValueAccessors.getAccessor(element); } else { accessor = new DefaultAccessor((org.jboss.errai.common.client.ui.HasValue) element); } return new JsTypeHasValueElementWrapperWidget<>(element, accessor, valueType); } else if (InputElement.is(element) || TextAreaElement.is(element)) { return new InputElementWrapperWidget<>(element); } else { return new DefaultElementWrapperWidget<>(element); } }