ExpandButton.js
Summary
No overview generated for 'ExpandButton.js'
var ExpandButton = Class.create();
ExpandButton.prototype.initialize = function(f)
{
this.img = document.createElement('IMG');
this.img.onclick = f;
this.img.style.cursor = 'pointer';
this.img.alt = '+/-';
};
ExpandButton.prototype.getButton = function()
{
return this.img;
};
ExpandButton.prototype.set = function(isExpanded, isNode)
{
var _this = this;
var icon = isExpanded ? JSWMImages.collapse : JSWMImages.expand;
var iconHover = isExpanded ? JSWMImagesHover.collapse : JSWMImagesHover.expand;
this.img.src = icon;
this.img.onmouseover = function() {
_this.img.src = iconHover;
};
this.img.onmouseout = function() {
_this.img.src = icon;
};
};
Documentation generated by
JSDoc on Sun May 6 13:35:11 2007