/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
dojo.provide("mywidget.widget.MinRequirement");
dojo.require("dojo.widget.HtmlWidget");

dojo.widget.defineWidget(
	// class
	"mywidget.widget.MinRequirement",
	// superclass	
	dojo.widget.HtmlWidget,
	
	// member variables/functions
	{
		mixInProperties: function(args, fragment, parent){
			mywidget.widget.MinRequirement.superclass.mixInProperties.apply(this, arguments);
			this.initWidget();	
		},		
	    initWidget:function(){		
					this.processor = this.data[0].name;
					this.instructionSet = this.data[0].childProperties[0].name;
					this.instructionSetValue = this.data[0].childProperties[0].properties[0].value;
					this.clock=this.data[0].childProperties[1].name;
					this.clockValue=this.data[0].childProperties[1].properties[1].value+this.data[0].childProperties[1].properties[0].value;
					this.ram=this.data[1].name;
					this.size=this.data[1].childProperties[0].name;
					this.sizeValue=this.data[1].childProperties[0].properties[0].value+this.data[1].childProperties[0].properties[1].value;
	    },
	    templateCssString:".minrequirement table td{border:0px;} .header{	font-size: 10pt;	font-weight:bold;	color:red;}.header2{	font-size: 10pt;	font-weight:bold;	color:#999;}",
		templatePath : new dojo.uri.Uri('', 'mywidget/widget/html/MinRequirement.html')		
	}
);
