@Override public Shape animate( JSONObject newAttrs, int duration ) { el.animate( newAttrs.getJavaScriptObject(), duration ); return this; }
@Override public Shape animate( JSONObject newAttrs, int duration, AnimationCallback callback ) { el.animate( newAttrs.getJavaScriptObject(), duration, callback ); return this; }
@Override public Shape animate( JSONObject newAttrs, int duration, String easing, AnimationCallback callback ) { el.animate( newAttrs.getJavaScriptObject(), duration, easing, callback ); return this; }
public Shape animateWith( Shape shape, JSONObject newAttrs, int duration, String easing, AnimationCallback callback ) { el.animateWith( shape.el, newAttrs.getJavaScriptObject(), duration, easing, callback ); return this; }
/** * @return a new instance of {@link JSONObject} casted to * {@link JavaScriptObject}. */ public JavaScriptObject toJSO() { return build().getJavaScriptObject(); }
public Shape animateWith( Shape shape, JSONObject newAttrs, int duration ) { el.animateWith( shape.el, newAttrs.getJavaScriptObject(), duration ); return this; }
@Override public Shape attr( JSONObject params ) { el.attr( params.getJavaScriptObject() ); return this; }
public Shape animateWith( Shape shape, JSONObject newAttrs, int duration, AnimationCallback callback ) { el.animateWith( shape.el, newAttrs.getJavaScriptObject(), duration, callback ); return this; }
private static Map<String, JSONValue> getInnerMap(JSONObject jsonObject) { JavaScriptObject jsObject = jsonObject.getJavaScriptObject(); Map<String, JSONValue> map = JavaScriptObjects.getObject(jsObject, JSONOBJECT_MAP); if (map == null) { map = new LinkedHashMap<String, JSONValue>(); JavaScriptObjects.setProperty(jsObject, JSONOBJECT_MAP, map); } return map; } }
JavaScriptObject asJSO() { final JSONObject parameter = new JSONObject(); if (properties !=null){ for (String key : properties.keySet()) { String value = String.valueOf(properties.get(key)); parameter.put(key, new JSONString(value)); } } return parameter.getJavaScriptObject(); }
@Override public Request call(final String command, final JSONObject request, final AsyncCallback<NObject> callback) { final NObjectJSO jso = Objects.requireNonNull(Objects.requireNonNull(request).getJavaScriptObject()).cast(); return call(command, new NObject(jso), callback); }
public final void setStringStringMap(String key, Map<String, String> map) { JSONObject object = new JSONObject(); for (String mapKey : map.keySet()) { object.put(mapKey, new JSONString(map.get(mapKey))); } set(key, object.getJavaScriptObject()); }
public final void setStringIntMap(String key, Map<String, Integer> map) { JSONObject object = new JSONObject(); for (String mapKey : map.keySet()) { object.put(mapKey, new JSONNumber(map.get(mapKey))); } set(key, object.getJavaScriptObject()); }
public GenericJSO getTokenValueJSO( String name ) { JSONValue value = values.get( name ); if( value == null ) return null; JSONObject obj = value.isObject(); if( obj == null ) return null; return obj.getJavaScriptObject().cast(); } }
private JavaScriptObject property(final String key, final double value) { final JSONObject jsonObject = new JSONObject(); jsonObject.put(key, new JSONNumber(value)); return jsonObject.getJavaScriptObject(); } }
@PostConstruct public void setup() { constraintsTooltip.setAttribute("title", translationService.format(DataTypeConstraintView_ConstraintsTooltip)); setupTooltip(properties().getJavaScriptObject()); }
@Override public NObject onWire() { final JSONObject object = toJSONObject(); if (null != object) { final NObjectJSO njso = object.getJavaScriptObject().cast(); return new NObject(njso); } return new NObject(); }
JQuery.CallbackFunction moveDropDownToKebabContainer() { return (event) -> { final JavaScriptObject properties = emptyProperties().getJavaScriptObject(); $(menu).append($(event.target).css(properties).detach()); }; }
public static JSPlaceRequest fromPlaceRequest(PlaceRequest pr) { JSPlaceRequest jspr = newInstance(); jspr.setIdentifier(pr.getIdentifier()); JSONObject rawParams = new JSONObject(); for (String name : pr.getParameterNames()) { rawParams.put(name, new JSONString(pr.getParameters().get(name))); } jspr.setParams(rawParams.getJavaScriptObject()); return jspr; }
private static JavaScriptObject createReturnValue(TeXIcon icon, double ratio) { JSONObject object = new JSONObject(); object.put("width", new JSONNumber(icon.getIconWidth())); object.put("height", new JSONNumber(icon.getIconHeight())); object.put("baseline", new JSONNumber(icon.getBaseLine())); object.put("pixelRatio", new JSONNumber(ratio)); return object.getJavaScriptObject(); }