1 /**
  2  * @author Gillis Haasnoot <gillis.haasnoot@gmail.com>
  3  * @package Banana.Controls
  4  * @summary Title control 
  5  */
  6 
  7 goog.provide('Banana.Controls.Title');
  8 
  9 /** @namespace Banana.Controls.Title */
 10 namespace('Banana.Controls').Title = Banana.UiControl.extend(
 11 /** @lends Banana.Controls.Title.prototype */
 12 {
 13 	/**
 14 	 * Creates a title
 15 	 * @param {String} tag i.e h2 
 16 	 * @constructs
 17 	 * @extends Banana.UiControl
 18 	 */
 19 	init: function(tag)
 20 	{
 21 		this._super();
 22 		
 23 		this.addCssClass('BTitle');
 24 		
 25 		this.tag = 'h2';
 26 		if (tag)
 27 			this.tag = tag;
 28 	},
 29 
 30 	/**
 31 	 * Specifies the tag.
 32 	 * Note not possible to change this after rerender
 33 	 * @param {String} tag
 34 	 * @return {this}
 35 	 */
 36 	setTagName: function(tag)
 37 	{
 38 		this.tag = tag;
 39 		return this;
 40 	},
 41 
 42 	/**
 43 	 * @return {String}
 44 	 */
 45 	getTagName : function()
 46 	{
 47 		return this.tag;
 48 	}
 49 });