1 /**
  2  * @author Gillis Haasnoot <gillis.haasnoot@gmail.com>
  3  * @package Banana.Controls
  4  * @summary Base decorator controls
  5  * 
  6  */
  7 
  8 goog.provide('Banana.Controls.Decorators.Decorator');
  9 
 10 /**
 11 @class
 12 @name Banana.Controls.Decorators
 13 */
 14 
 15 /** @namespace Banana.Controls.Decorators.Decorator */
 16 namespace('Banana.Controls.Decorators').Decorator = Banana.Controls.Panel.extend(
 17 /** @lends Banana.Controls.Decorators.Decorator.prototype */
 18 {
 19 	/**
 20 	 * Creates a base decorator. 
 21 	 * 
 22 	 * @param {Banana.Control} dc
 23 	 * @constructs
 24 	 * @extends Banana.Controls.Panel
 25 	 */
 26 	init : function(dc)
 27 	{
 28 		this._super();
 29 		this.decoratedControl = dc;
 30 	},
 31 	
 32 	/**
 33 	 * @return {Banana.Control}
 34 	 */
 35 	getDecoratedControl : function()
 36 	{
 37 		if (this.decoratedControl instanceof Banana.Controls.Decorators.Decorator)
 38 		{
 39 			return this.decoratedControl.getDecoratedControl();
 40 		}
 41 
 42 		return this.decoratedControl;
 43 	}
 44 });