Package com.gwtext.client.core

Examples of com.gwtext.client.core.Function


     * @param function the function to execute on render
     * @param delayMillis a delay in milliseconds
     */
    public void doOnRender(final Function function, final int delayMillis) {
        if(!isRendered()) {
            addListener("render", new Function() {
                public void execute() {
                    new Timer() {
                        public void run() {
                             function.execute();
                        }
View Full Code Here


            }
        }
        configListeners.clear();
        configListeners = null;
        initComponent();
        addListener("render", new Function() {
            public void execute() {
                Component.this.afterRender();
            }
        });

        addListener("beforedestroy", new Function() {
            public void execute() {
                JavaScriptObjectHelper.setAttribute(Component.this.getConfig(), "__compJ", (String)null);
                if(isRendered()) {
                    doBeforeDestroy(Component.this.getJsObj());
                }
                beforeDestroy();
            }
            private native void doBeforeDestroy(JavaScriptObject jsObj) /*-{
                if(jsObj != null && jsObj.__compJ) {
                    jsObj.__compJ = null;
                }
            }-*/;
        });
        addListener("destroy", new Function() {
            public void execute() {
                onDestroy();
            }
        });
    }
View Full Code Here

   * Disable this component.
   */
  public void disable() {
        if(!isRendered()) {
            initDisabled = true;
            addListener("render", new Function() {
                public void execute() {
                    disableRendered();
                }
            });
        } else {
View Full Code Here

  /**
   * Enable this component.
   */
  public void enable() {
        if(!isRendered()) {
            addListener("render", new Function() {
                public void execute() {
                    enableRendered();
                }
            });
        } else {
View Full Code Here

  /**
   * Try to focus this component.
   */
    public  void focus() {
        if(!isRendered()) {
            addListener("render", new Function() {
                public void execute() {
                    focusRendered();
                }
            });
        }
View Full Code Here

   * Hide this component.
   */
  public void hide() {
        if(!isRendered()) {
            initHidden = true;
            addListener("render", new Function() {
                public void execute() {
                    hideRendered();
                }
            });
        } else {
View Full Code Here

  /**
   * Show this component.
   */
  public void show() {
        if(!isRendered()) {
            addListener("render", new Function() {
                public void execute() {
                    showRendered();
                }
            });
        } else {
View Full Code Here

                DOM.removeElementAttribute(getElement(), "title");
            } else {
                DOM.setElementAttribute(getElement(), "title", title);
            }
        } else {
            addListener("render", new Function() {
                public void execute() {
                    setTitle(title);
                }
            });
        }
View Full Code Here

    public Resizable(final Component component, final ResizableConfig config) {
        if (component.isRendered()) {
            jsObj = create(component.getId(), config == null ? null : config.getJsObj());
        } else {
            lazyComponent = component;
            component.addListener("render", new Function() {
                public void execute() {
                    jsObj = create(component.getId(), config == null ? null : config.getJsObj());
                }
            });
        }
View Full Code Here

     *
     * @param listener the listener
     */
    public void addListener(final ResizableListener listener)  {
        if(lazyComponent != null) {
            lazyComponent.addListener("render", new Function(){
                public void execute() {
                    addListenerRendered(listener);
                }
            });
        } else {
View Full Code Here

TOP

Related Classes of com.gwtext.client.core.Function

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.