X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/KeyMap.html diff --git a/docs/source/KeyMap.html b/docs/source/KeyMap.html index 93c9d07d..6e441ce5 100644 --- a/docs/source/KeyMap.html +++ b/docs/source/KeyMap.html @@ -1,5 +1,22 @@ -
+ +/** - * @class Ext.util.KeyMap + + + + +\ No newline at end of file +});The source code + + + + + + +/** + * @class Ext.util.KeyMap * Handles mapping keys to actions for an element. One key map can be used for multiple actions. * The constructor accepts the same config object as defined by {@link #addBinding}. * If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key @@ -39,14 +56,16 @@ var map = new Ext.util.KeyMap("my-element", [ ]); </code></pre> * <b>Note: A KeyMap starts enabled</b> - * @constructor - * @param {Mixed} el The element to bind to - * @param {Object} binding The binding (see {@link #addBinding}) - * @param {String} eventName (optional) The event to bind to (defaults to "keydown") */ Ext.define('Ext.util.KeyMap', { alternateClassName: 'Ext.KeyMap', - + + /** + * Creates new KeyMap. + * @param {Mixed} el The element to bind to + * @param {Object} binding The binding (see {@link #addBinding}) + * @param {String} eventName (optional) The event to bind to (defaults to "keydown") + */ constructor: function(el, binding, eventName){ var me = this; @@ -63,7 +82,7 @@ Ext.define('Ext.util.KeyMap', { eventName: 'keydown', - /** + /** * Add a new binding to this KeyMap. The following config object properties are supported: * <pre> Property Type Description @@ -140,7 +159,7 @@ map.addBinding({ }, binding)); }, - /** + /** * Process any keydown events on the element * @private * @param {Ext.EventObject} event @@ -158,7 +177,7 @@ map.addBinding({ } }, - /** + /** * Ugly hack to allow this class to be tested. Currently WebKit gives * no way to raise a key event properly with both * a) A keycode @@ -172,7 +191,7 @@ map.addBinding({ return event; }, - /** + /** * Process a particular binding and fire the handler if necessary. * @private * @param {Object} binding The binding information @@ -201,7 +220,7 @@ map.addBinding({ } }, - /** + /** * Check if the modifiers on the event match those on the binding * @private * @param {Object} binding @@ -224,7 +243,7 @@ map.addBinding({ return true; }, - /** + /** * Shorthand for adding a single key listener * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the * following options: @@ -252,7 +271,7 @@ map.addBinding({ }); }, - /** + /** * Returns true if this KeyMap is enabled * @return {Boolean} */ @@ -260,7 +279,7 @@ map.addBinding({ return this.enabled; }, - /** + /** * Enables this KeyMap */ enable: function(){ @@ -270,7 +289,7 @@ map.addBinding({ } }, - /** + /** * Disable this KeyMap */ disable: function(){ @@ -280,7 +299,7 @@ map.addBinding({ } }, - /** + /** * Convenience function for setting disabled/enabled by boolean. * @param {Boolean} disabled */ @@ -292,7 +311,7 @@ map.addBinding({ } }, - /** + /** * Destroys the KeyMap instance and removes all handlers. * @param {Boolean} removeEl True to also remove the attached element */ @@ -306,4 +325,6 @@ map.addBinding({ } delete me.el; } -});