

"use strict";

/**
 * A generic tab.
 * @param {String} name The internal name of the tab.
 */
$.Class("izpack.view", "GenericView", {
	
	init : function (name) {
		/**
		 * The name of the tab.
		 */
		this.name = name;

		/**
		 * The html id used for this tab.
		 */
		this.id = "tab-" + name;
		
		/**
		 * the url of the associated view
		 */
		this.href = "html/" + this.id + ".html";

		/**
		 * Is the html view loaded ?
		 */
		this.viewLoaded = false;
	},
	
	methods : {
		/**
		 * This method is called when the view (html) is loaded.
		 * It calls then the method initView.
		 */
		load : function () {
			this.viewLoaded = true;
			this.initView();
		}
	},
	
	abstracts : {
		
		/**
		 * Adds the UI logic (drag/drop, etc) as soon as the html tab is loaded.
		 */
		initView : function () {}
	}
});
