/**
* package junit
*/
'package junit'.j(function () {
/**
* @class junit.Observable
*/
'class Observable'.j({
/**
* @constructor
* @param config
*/
hidden:true,
constructor: function (config) {
var jthis = this;
$.extend(jthis, config);
},
addEvents: function (o) {
}
});
});
'package jui'.j(function () {
/**
* @class jui.Component
* @extends junit.Observable
*/
'class Component implements junit.Observable'.j(function (jsuper, ob) {
jstatic(jsuper, {
AUTO_ID: 1000
});
// project
jprotected(jsuper, {
getId: function () {
return this.id || (this.id = 'jc-' + (++this.jstatic.AUTO_ID));
}
});
// publc vars
jpublic(jsuper, {
hidden: false
});
// publc method
jpublic(jsuper, {
constructor: function (config) {
$.extend(this, config);
jcall(ob, this);
this.initComponent();
},
initComponent: $.noop,
afterRender: $.noop,
render: function (container, position) {
if (!this.rendered && this.fireEvent('beforerender', this) !== false) {
if (!container && this.el) {
this.el = $.get(this.el);
container = this.el.dom().parentNode;
this.allowDomMove = false;
}
this.container = $.get(container);
}
return this;
}
});
}, 'component');
});