4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-AbstractPlugin'>/**
19 </span> * @class Ext.AbstractPlugin
22 * <p>The AbstractPlugin class is the base class from which user-implemented plugins should inherit.</p>
23 * <p>This class defines the essential API of plugins as used by Components by defining the following methods:</p>
25 * <li><code>init</code> : The plugin initialization method which the owning Component calls at Component initialization
26 * time.<div class="sub-desc"><p>The Component passes itself as the sole parameter.</p><p>Subclasses should set up bidirectional
27 * links between the plugin and its client Component here.</p></div></li>
28 * <li><code>destroy</code> : The plugin cleanup method which the owning Component calls at Component destruction time.<div class="sub-desc">Use
29 * this method to break links between the plugin and the Component and to free any allocated resources.</div></li>
30 * <li><code>enable</code> : The base implementation just sets the plugin's <code>disabled</code> flag to <code>false</code><div class="sub-desc"></div></li>
31 * <li><code>disable</code> : The base implementation just sets the plugin's <code>disabled</code> flag to <code>true</code><div class="sub-desc"></div></li>
34 Ext.define('Ext.AbstractPlugin', {
37 constructor: function(config) {
39 if (!config.cmp && Ext.global.console) {
40 Ext.global.console.warn("Attempted to attach a plugin ");
43 Ext.apply(this, config);
50 <span id='Ext-AbstractPlugin-method-init'> /**
51 </span> * <p>The init method is invoked after {@link Ext.Component#initComponent initComponent} has been run for the client Component.</p>
52 * <p>The supplied implementation is empty. Subclasses should perform plugin initialization, and set up bidirectional
53 * links between the plugin and its client Component in their own implementation of this method.</p>
54 * @param {Component} client The client Component which owns this plugin.
59 <span id='Ext-AbstractPlugin-method-destroy'> /**
60 </span> * <p>The destroy method is invoked by the owning Component at the time the Component is being destroyed.</p>
61 * <p>The supplied implementation is empty. Subclasses should perform plugin cleanup in their own implementation of this method.</p>
66 <span id='Ext-AbstractPlugin-method-enable'> /**
67 </span> * <p>The base implementation just sets the plugin's <code>disabled</code> flag to <code>false</code></p>
68 * <p>Plugin subclasses which need more complex processing may implement an overriding implementation.</p>
71 this.disabled = false;
74 <span id='Ext-AbstractPlugin-method-disable'> /**
75 </span> * <p>The base implementation just sets the plugin's <code>disabled</code> flag to <code>true</code></p>
76 * <p>Plugin subclasses which need more complex processing may implement an overriding implementation.</p>