Package com.google.gwt.core.client

Examples of com.google.gwt.core.client.JavaScriptObject


    (this.@com.googlecode.mgwt.collection.client.JsLightMap::map)[key] = value;
  }-*/;

  @Override
  public LightArray<String> getKeys() {
    JavaScriptObject array = getNativeKeyArray();
    return new JsLightArray<String>(array);
  }
View Full Code Here


      this.width = width;
    }
  }

  public static void embedSWF(String url, String replaceId, SwfConfig cfg) {
    JavaScriptObject vars = Util.getJsObject(cfg.flashVars, 4);
    JavaScriptObject params = Util.getJsObject(cfg.params, 4);
    JavaScriptObject attrs = Util.getJsObject(cfg.attrs, 4);
    embedSWT(url, replaceId, cfg.width, cfg.height, cfg.version, cfg.expressInstallUrl, vars, params, attrs);
  }
View Full Code Here

     * The source Panel.
     *
     * @return the source Panel
     */
    public Panel getPanel() {
        JavaScriptObject gridJS = getPropertyAsJavaScriptObject("panel");
        return (Panel) ComponentFactory.getComponent(gridJS);
    }
View Full Code Here

    public int getType() {
        return type;
    }

    public static JavaScriptObject getJsObj(NameValuePair[] nameValuePairs) {
        JavaScriptObject paramObj = JavaScriptObjectHelper.createObject();
        if (nameValuePairs == null) return paramObj;

        for (int i = 0; i < nameValuePairs.length; i++) {
            NameValuePair param = nameValuePairs[i];
            switch (param.getType()) {
View Full Code Here

    public void addAttribute(String name, String value) {
        otherConfig.put(name, value);
    }

    public JavaScriptObject getJsObject() {
        JavaScriptObject jsObj = JavaScriptObjectHelper.createObject();
        if (tag != null) JavaScriptObjectHelper.setAttribute(jsObj, "tag", tag);
        if (id != null) JavaScriptObjectHelper.setAttribute(jsObj, "id", id);
        if (cls != null) JavaScriptObjectHelper.setAttribute(jsObj, "cls", cls);
        if (style != null) JavaScriptObjectHelper.setAttribute(jsObj, "style", style);
        if (html != null) JavaScriptObjectHelper.setAttribute(jsObj, "html", html);
View Full Code Here

   *
   * @param params the base params
     * @throws IllegalStateException this property cannot be changed after the Component has been rendered
   */
  public void setBaseParams(UrlParam[] params) throws IllegalStateException {
    JavaScriptObject paramObj = UrlParam.getJsObj(params);
    setAttribute("baseParams", paramObj, true);
  }
View Full Code Here

     * @param displayField the display field
     * @throws IllegalStateException this property cannot be changed after the Component has been rendered
     */
    public void setDisplayField(String displayField) throws IllegalStateException {
        setAttribute("displayField", displayField, true);
        JavaScriptObject store = JavaScriptObjectHelper.getAttributeAsJavaScriptObject(config, "store");
        if (store != null) {
            setFilterColParam(store, displayField);
        } else {
            this.displayField = displayField;
        }
View Full Code Here

     * Request headers which are added to each request made by this object.
     *
     * @param defaultHeaders default headers
     */
    public void setDefaultHeaders(NameValuePair[] defaultHeaders) {
        JavaScriptObject paramObj = NameValuePair.getJsObj(defaultHeaders);
        JavaScriptObjectHelper.setAttribute(jsObj, "defaultHeaders", paramObj);
    }
View Full Code Here

     * Properties which are used as extra parameters to each request made by this object.
     *
     * @param params request parameters
     */
    public void setExtraParams(UrlParam[] params) {
        JavaScriptObject paramObj = UrlParam.getJsObj(params);
        JavaScriptObjectHelper.setAttribute(jsObj, "extraParams", paramObj);
    }
View Full Code Here

     * @return the reusable dom query function
     */
    public static DomQueryFunction compile(String selector, SelectorType type) {

        String selectorType = type == null ? null : type.getType();
        final JavaScriptObject fn = doCompile(selector, selectorType);

        return new DomQueryFunction() {
            public Element[] query() {
                JavaScriptObject els = doQuery(fn);
                return JavaScriptObjectHelper.toElementArray(els);

            }

            private native JavaScriptObject doQuery(JavaScriptObject fn) /*-{
                return fn();
            }-*/;

            public Element[] query(Element root) {
                JavaScriptObject els = doQuery(fn, root);
                return JavaScriptObjectHelper.toElementArray(els);
            }

            private native JavaScriptObject doQuery(JavaScriptObject fn, Element root) /*-{
                return fn(root);
View Full Code Here

TOP

Related Classes of com.google.gwt.core.client.JavaScriptObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.