Created
December 27, 2009 03:52
-
-
Save levancho/264144 to your computer and use it in GitHub Desktop.
YUI3 Widget Template for Netbeans 6.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#-- This is a FreeMarker template --> | |
<#-- You can change the contents of the license inserted into | |
# each template by opening Tools | Templates and editing | |
# Licenses | Default License --> | |
<#assign licenseFirst = "/* "> | |
<#assign licensePrefix = " * "> | |
<#assign licenseLast = " */"> | |
<#include "../Licenses/license-${project.license}.txt"> | |
/** | |
* | |
* | |
* @module ${name?cap_first} | |
*/ | |
// vars. constants shortcuts | |
/** | |
* | |
* | |
* @class ${name?cap_first} | |
* @extends Widget | |
* @param config {Object} Configuration object | |
* @constructor | |
*/ | |
function ${name?cap_first}() { | |
${name?cap_first}.superclass.constructor.apply(this,arguments); | |
} | |
Y.mix(${name?cap_first}, { | |
/** | |
* The identity of the widget. | |
* | |
* @property ${name?cap_first}.NAME | |
* @type String | |
* @static | |
*/ | |
NAME : "${name?lower_case}", | |
/** | |
* Static Object hash used to capture existing markup for progressive | |
* enhancement. Keys correspond to config attribute names and values | |
* are selectors used to inspect the contentBox for an existing node | |
* structure. | |
* | |
* @property ${name?cap_first}.HTML_PARSER | |
* @type Object | |
* @protected | |
* @static | |
*/ | |
HTML_PARSER : {}, | |
/** | |
* Static property used to define the default attribute configuration of | |
* the Widget. | |
* | |
* @property ${name?cap_first}.ATTRS | |
* @type Object | |
* @protected | |
* @static | |
*/ | |
ATTRS : { | |
/** | |
* This attribute is | |
* defined by the base Widget class but has an empty value | |
* | |
* @property ${name?cap_first}.ATTRS | |
* @type Object | |
* @protected | |
* @static | |
*/ | |
strings: { | |
value: { | |
//yourkey:your String value | |
} | |
} | |
} | |
}); | |
Y.extend(${name?cap_first}, Y.Widget, { | |
// config params: | |
// _disabled : false, | |
/** | |
* | |
* | |
* @method initializer | |
* @protected | |
*/ | |
initializer : function () { | |
//Signals | |
//this.publish(SOMETHING); | |
}, | |
/** | |
* Create the DOM structure for the ${name?lower_case}. | |
* | |
* @method renderUI | |
* @protected | |
*/ | |
renderUI : function () { | |
}, | |
/** | |
* | |
* @method bindUI | |
* @protected | |
*/ | |
bindUI : function () { | |
}, | |
/** | |
* Synchronizes the DOM state with the attribute settings | |
* | |
* @method syncUI | |
*/ | |
syncUI : function () { | |
}, | |
/** | |
* Destructor lifecycle implementation for the ${name?lower_case} class. | |
* | |
* @method destructor | |
* @protected | |
*/ | |
destructor: function() { } | |
}); | |
Y.${name?cap_first} = ${name?cap_first}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment