Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/source/BaseItem.html  view on Meta::CPAN


<span id='Ext-menu-BaseItem-method-setHandler'>    /**
</span>     * Sets the function that will handle click events for this item (equivalent to passing in the {@link #handler}
     * config property).  If an existing handler is already registered, it will be unregistered for you.
     * @param {Function} handler The function that should be called on click
     * @param {Object} scope The scope (&lt;code&gt;this&lt;/code&gt; reference) in which the handler function is executed. Defaults to this menu item.
     */
    setHandler : function(handler, scope){
        if(this.handler){
            this.un(&quot;click&quot;, this.handler, this.scope);
        }
        this.on(&quot;click&quot;, this.handler = handler, this.scope = scope);
    },

<span id='Ext-menu-BaseItem-method-onClick'>    // private
</span>    onClick : function(e){
        if(!this.disabled &amp;&amp; this.fireEvent(&quot;click&quot;, this, e) !== false
                &amp;&amp; (this.parentMenu &amp;&amp; this.parentMenu.fireEvent(&quot;itemclick&quot;, this, e) !== false)){
            this.handleClick(e);
        }else{
            e.stopEvent();
        }
    },

<span id='Ext-menu-BaseItem-method-activate'>    // private
</span>    activate : function(){
        if(this.disabled){
            return false;
        }
        var li = this.container;
        li.addClass(this.activeClass);
        this.region = li.getRegion().adjust(2, 2, -2, -2);
        this.fireEvent(&quot;activate&quot;, this);
        return true;
    },

<span id='Ext-menu-BaseItem-method-deactivate'>    // private
</span>    deactivate : function(){
        this.container.removeClass(this.activeClass);
        this.fireEvent(&quot;deactivate&quot;, this);
    },

<span id='Ext-menu-BaseItem-method-shouldDeactivate'>    // private
</span>    shouldDeactivate : function(e){
        return !this.region || !this.region.contains(e.getPoint());
    },

<span id='Ext-menu-BaseItem-method-handleClick'>    // private
</span>    handleClick : function(e){
        var pm = this.parentMenu;
        if(this.hideOnClick){
            if(pm.floating){
                this.clickHideDelayTimer = pm.hide.defer(this.clickHideDelay, pm, [true]);
            }else{
                pm.deactivateActive();
            }
        }
    },
    
<span id='Ext-menu-BaseItem-method-beforeDestroy'>    beforeDestroy: function(){
</span>        clearTimeout(this.clickHideDelayTimer);
        Ext.menu.BaseItem.superclass.beforeDestroy.call(this);    
    },

<span id='Ext-menu-BaseItem-method-expandMenu'>    // private. Do nothing
</span>    expandMenu : Ext.emptyFn,

<span id='Ext-menu-BaseItem-method-hideMenu'>    // private. Do nothing
</span>    hideMenu : Ext.emptyFn
});
Ext.reg('menubaseitem', Ext.menu.BaseItem);</pre>
</body>
</html>



( run in 1.478 second using v1.01-cache-2.11-cpan-ceb78f64989 )