-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.menu.CheckItem"></div>/**
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.menu.CheckItem"></div>/**
* @class Ext.menu.CheckItem
* @extends Ext.menu.Item
* Adds a menu item that contains a checkbox by default, but can also be part of a radio group.
* @param {Object} config Configuration options
* @xtype menucheckitem
*/
-Ext.menu.CheckItem = function(config){
- Ext.menu.CheckItem.superclass.constructor.call(this, config);
- this.addEvents(
- <div id="event-Ext.menu.CheckItem-beforecheckchange"></div>/**
- * @event beforecheckchange
- * Fires before the checked value is set, providing an opportunity to cancel if needed
- * @param {Ext.menu.CheckItem} this
- * @param {Boolean} checked The new checked value that will be set
- */
- "beforecheckchange" ,
- <div id="event-Ext.menu.CheckItem-checkchange"></div>/**
- * @event checkchange
- * Fires after the checked value has been set
- * @param {Ext.menu.CheckItem} this
- * @param {Boolean} checked The checked value that was set
- */
- "checkchange"
- );
- <div id="method-Ext.menu.CheckItem-checkHandler"></div>/**
- * A function that handles the checkchange event. The function is undefined by default, but if an implementation
- * is provided, it will be called automatically when the checkchange event fires.
- * @param {Ext.menu.CheckItem} this
- * @param {Boolean} checked The checked value that was set
- * @method checkHandler
- */
- if(this.checkHandler){
- this.on('checkchange', this.checkHandler, this.scope);
- }
- Ext.menu.MenuMgr.registerCheckable(this);
-};
-Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, {
+Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
<div id="cfg-Ext.menu.CheckItem-group"></div>/**
* @cfg {String} group
* All check items with the same group name will automatically be grouped into a single-select
// private
ctype: "Ext.menu.CheckItem",
+
+ initComponent : function(){
+ Ext.menu.CheckItem.superclass.initComponent.call(this);
+ this.addEvents(
+ <div id="event-Ext.menu.CheckItem-beforecheckchange"></div>/**
+ * @event beforecheckchange
+ * Fires before the checked value is set, providing an opportunity to cancel if needed
+ * @param {Ext.menu.CheckItem} this
+ * @param {Boolean} checked The new checked value that will be set
+ */
+ "beforecheckchange" ,
+ <div id="event-Ext.menu.CheckItem-checkchange"></div>/**
+ * @event checkchange
+ * Fires after the checked value has been set
+ * @param {Ext.menu.CheckItem} this
+ * @param {Boolean} checked The checked value that was set
+ */
+ "checkchange"
+ );
+ <div id="method-Ext.menu.CheckItem-checkHandler"></div>/**
+ * A function that handles the checkchange event. The function is undefined by default, but if an implementation
+ * is provided, it will be called automatically when the checkchange event fires.
+ * @param {Ext.menu.CheckItem} this
+ * @param {Boolean} checked The checked value that was set
+ * @method checkHandler
+ */
+ if(this.checkHandler){
+ this.on('checkchange', this.checkHandler, this.scope);
+ }
+ Ext.menu.MenuMgr.registerCheckable(this);
+ },
// private
onRender : function(c){
Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments);
}
});
-Ext.reg('menucheckitem', Ext.menu.CheckItem);</pre>
-</body>
+Ext.reg('menucheckitem', Ext.menu.CheckItem);</pre> \r
+</body>\r
</html>
\ No newline at end of file