/**
* SimpleWidget
*
* A simple box shaped widget with a class set applied to it.  
*
* Simple widget supports the following style_set elements
*   -style_set_sw : The overall widget style
*   -style_set_sw_container : The content container style
* 
* @param style_set
**/
function SimpleWidget( style_set ) { 

	this.style_set = style_set;

	this.content_array = new Array();
	
	this.container_dom = document.createElement( 'div' );
	this.content_container = document.createElement( 'div' );

	this.container_dom.className = this.style_set + "_sw";
	this.content_container.className = this.style_set + "_sw_container";

	this.container_dom.appendChild( this.content_container );

}

SimpleWidget.prototype = new AbstractWidget();

/**
* SimpleWidget.hideWidget
*
* Change the visibility of a rendered widget and also decrease the height and width to 0 so that it does not impact surrounding widgets
* Also remove listeners so that class name does not revert upon resizing of the widget
*
**/
SimpleWidget.prototype.hideWidget = function() { 

	this.container_dom.className = "hidden_widget";

}

/**
* SimpleWidget.showWidget
*
* Change the visibility of a rendered widget and also return the width and height to their original values
*
**/
SimpleWidget.prototype.showWidget = function() { 

	this.container_dom.className = this.style_set + "_sw";

}

/**
* SimpleWidgetFactory
*
* A factory for simple widgets
*
* @param style_set
**/
function SimpleWidgetFactory( style_set ) { 

	this.style_set = style_set;

}

new SimpleWidgetFactory();

SimpleWidgetFactory.prototype.build = function() { 

	return new SimpleWidget( this.style_set );

}

