本文整理汇总了Java中gwt.interop.utils.client.plainobjects.JsPlainObj类的典型用法代码示例。如果您正苦于以下问题:Java JsPlainObj类的具体用法?Java JsPlainObj怎么用?Java JsPlainObj使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JsPlainObj类属于gwt.interop.utils.client.plainobjects包,在下文中一共展示了JsPlainObj类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testInitPlainObjectAllPrimitiveTypes
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public void testInitPlainObjectAllPrimitiveTypes() {
JsPlainObj o1 = $jsPlainObj(
"a", 1,
"a1", Integer.valueOf(1),
"b", 10.1,
"b1", Double.valueOf(10.1),
"c", true,
"c1", Boolean.valueOf(true),
"d","stringvalue"
);
assertEquals(o1.toJSONString(), "{\"a\":1,\"a1\":1,\"b\":10.1,\"b1\":10.1,\"c\":true,\"c1\":true,\"d\":\"stringvalue\"}");
}
开发者ID:GWTReact,项目名称:gwt-interop-utils,代码行数:13,代码来源:PlainObjectTests.java
示例2: testConstructPlainObject
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public void testConstructPlainObject() {
JsPlainObj o2 = new JsPlainObj();
o2.set("b", 2);
o2.set("d", 3);
assertEquals(o2.toJSONString(), "{\"b\":2,\"d\":3}");
}
开发者ID:GWTReact,项目名称:gwt-interop-utils,代码行数:8,代码来源:PlainObjectTests.java
示例3: testMerge
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public void testMerge() {
JsPlainObj o1 = $jsPlainObj("a", 1, "b", 10, "c", 20);
JsPlainObj o2 = $jsPlainObj("b", 2, "d", 3);
JsPlainObj o3 = o1.merge(o2);
assertEquals(o3.toJSONString(), "{\"a\":1,\"b\":2,\"c\":20,\"d\":3}");
}
开发者ID:GWTReact,项目名称:gwt-interop-utils,代码行数:8,代码来源:PlainObjectTests.java
示例4: testInitPlainObject
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public void testInitPlainObject() {
JsPlainObj o1 = $jsPlainObj("a", 1, "b", 10, "c", 20);
assertEquals(o1.toJSONString(), "{\"a\":1,\"b\":10,\"c\":20}");
}
开发者ID:GWTReact,项目名称:gwt-interop-utils,代码行数:5,代码来源:PlainObjectTests.java
示例5: testInitPlainObjectWithSuppliedObject
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public void testInitPlainObjectWithSuppliedObject() {
JsPlainObj o1 = $(new JsPlainObj(), "a", 2, "b", 20, "c", 30);
assertEquals(o1.toJSONString(), "{\"a\":2,\"b\":20,\"c\":30}");
}
开发者ID:GWTReact,项目名称:gwt-interop-utils,代码行数:6,代码来源:PlainObjectTests.java
示例6: testExcept
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public void testExcept() {
JsPlainObj o1 = $jsPlainObj("a", 1, "b", 10, "c", 20);
JsPlainObj o2 = o1.except("a","c");
assertEquals(o2.toJSONString(), "{\"b\":10}");
}
开发者ID:GWTReact,项目名称:gwt-interop-utils,代码行数:7,代码来源:PlainObjectTests.java
示例7: setDangerouslyInnerHTML
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
@JsOverlay public final void setDangerouslyInnerHTML(String __html) {
JsPlainObj o = new JsPlainObj();
o.set("__html", __html);
setDangerouslySetInnerHTML(o);
}
开发者ID:GWTReact,项目名称:gwt-react,代码行数:6,代码来源:HtmlGlobalFields.java
示例8: createElement
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
@JsOverlay
public static <P extends BaseProps, S extends JsPlainObj, T extends Component<P, S>> ReactElement<P, T> createElement(Class<T> type, P props, String value) {
return createElement(ComponentUtils.getCtorFn(type), props, value);
}
开发者ID:GWTReact,项目名称:gwt-react,代码行数:5,代码来源:React.java
示例9: cloneElement
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
/**
* <p>Clone and return a new ReactElement using element as the starting point. The resulting
* element will have the original element's props with the new props merged in shallowly.
* New children will replace existing children. Unlike React.addons.cloneWithProps, key and
* ref from the original element will be preserved. There is no special behavior for merging
* any props (unlike cloneWithProps). See the v0.13 RC2 blog post for additional details.</p>
*
* @param element the element to clone
* @param props the props to merge
* @return the cloned element
*/
public static native <P extends BaseProps, T> ReactElement<P, T> cloneElement(ReactElement<P, T> element, JsPlainObj props);
开发者ID:GWTReact,项目名称:gwt-react,代码行数:13,代码来源:React.java
示例10: getCtorFn
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
/**
* Given the Class of a JsType annotated {@link Component} class, return the constructor function to use in Javascript
* @param cls The Class
* @param <P> The type of props the {@link Component} supports
* @param <S> The type of state the {@link Component} supports
* @param <T> The type of {@link Component}
* @return The constructor function
*/
public static native <P extends BaseProps, S extends JsPlainObj, T extends Component<P, S>> ComponentConstructorFn<P> getCtorFn(Class<T> cls) /*-{
return [email protected]::jsConstructor;
}-*/;
开发者ID:GWTReact,项目名称:gwt-react,代码行数:12,代码来源:ComponentUtils.java
示例11: observer
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
/**
* The observer function can be used to turn ReactJS components into reactive components. It
* wraps the component's render function in mobx.autorun to make sure that any data that is
* used during the rendering of a component forces a re-rendering upon change.
*
* <p>Tip: when observer needs to be combined with other higher-order-components, make sure
* that observer is the innermost (first applied) function; otherwise it might do nothing
* at all.</p>
*
* @param type The react Component class to make an observer
* @param <P> The prop types
* @return A wrapped Component class
*/
@JsOverlay
public static <P extends BaseProps, S extends JsPlainObj, T extends Component<P, S>> ComponentConstructorFn<P> observer(Class<T> type) {
return observer(ComponentUtils.getCtorFn(type));
}
开发者ID:GWTReact,项目名称:gwt-mobx,代码行数:18,代码来源:MobXReact.java
示例12: observable
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
/**
* Makes the supplied Object Literal observable.
*
* MobX will recursively pass all the supplied object literal values through observable.
* This way the complete object (tree) is in-place instrumented to make it observable
*
* @param jsPlainObj The object to make observable
* @param <O> A subclass of JsPlainObj
* @return An augmented version of the supplied object that will update any views that depend
* on it.
*/
public static native <O extends JsPlainObj> O observable(O jsPlainObj);
开发者ID:GWTReact,项目名称:gwt-mobx,代码行数:13,代码来源:MobX.java
示例13: toJSON
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
/**
* Recursively converts an ObservableArray object to a JSON structure. Supports observable
* arrays, objects, maps and primitives. Computed values and other non-enumerable
* properties won't be part of the result. Cycles are supported by default, but this
* can be disabled to improve performance.
*
* @param array The ObservableArray to convert
* @param supportCycles True to support cyclic structures
* @param <O> The JSON literal
* @return A JSON structure
*/
public static native <O extends JsPlainObj> O toJSON(ObservableArray<?> array, boolean supportCycles);
开发者ID:GWTReact,项目名称:gwt-mobx,代码行数:13,代码来源:MobX.java
示例14: combineReducers
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
public native static <STATE, A extends Action> Reducer<STATE, A> combineReducers(JsPlainObj reducersLiteral);
开发者ID:GWTReact,项目名称:gwt-redux,代码行数:2,代码来源:Redux.java
示例15: mapProps
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
JsPlainObj mapProps(S state, P ownProps);
开发者ID:GWTReact,项目名称:gwt-redux,代码行数:2,代码来源:MapStateToPropsFn.java
示例16: mapDispatchToProps
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
JsPlainObj mapDispatchToProps(Dispatch dispatch, P ownProps);
开发者ID:GWTReact,项目名称:gwt-redux,代码行数:2,代码来源:MapDispatchToPropsFn.java
示例17: setDangerouslySetInnerHTML
import gwt.interop.utils.client.plainobjects.JsPlainObj; //导入依赖的package包/类
@JsProperty protected native void setDangerouslySetInnerHTML(JsPlainObj __html);
开发者ID:GWTReact,项目名称:gwt-react,代码行数:2,代码来源:HtmlGlobalFields.java
注:本文中的gwt.interop.utils.client.plainobjects.JsPlainObj类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论