RequestOutputPlotLabelNodeClass.php 2.48 KB
<?php

define ("REQUESTOUTPUTPLOTLABEL_FONTNAME", "fontName");
define ("REQUESTOUTPUTPLOTLABEL_FONTSIZE", "fontSize");
define ("REQUESTOUTPUTPLOTLABEL_FONTSTYLE", "fontStyle");
define ("REQUESTOUTPUTPLOTLABEL_FONTWEIGHT", "fontWeight");
define ("REQUESTOUTPUTPLOTLABEL_COLOR", "color");
define ("REQUESTOUTPUTPLOTLABEL_COLORMAPINDEX", "colorMapIndex");

/**
 * @class RequestOutputPlotTitleNodeClass
 * @brief Definition of a title for a plot request
 * @details
*/
class RequestOutputPlotLabelNodeClass extends NodeClass
{
	public function __construct($nodeName)
	{
		parent::__construct($nodeName);
	}
	
	public function setFontName($fontName)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLABEL_FONTNAME, $fontName);
	}
	
	public function getFontName()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_FONTNAME);
	}

	public function setFontSize($fontSize)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLABEL_FONTSIZE, $fontSize);
	}
	
	public function getFontSize()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_FONTSIZE);
	}
	
	public function setFontStyle($style)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLABEL_FONTSTYLE, $style);
	}
	
	public function getFontStyle()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_FONTSTYLE);
	}
	
	public function setFontWeight($weight)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLABEL_FONTWEIGHT, $weight);
	}

	public function getFontWeight()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_FONTWEIGHT);
	}

	public function setColor($color)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLABEL_COLOR, $color);
	}
	
	public function getColor()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_COLOR);
	}
	
	public function setColorMapIndex($colorMapIndex)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLABEL_COLORMAPINDEX, $colorMapIndex);
	}
	
	public function getColorMapIndex()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_COLORMAPINDEX);
	}
	
	public function loadFromNode($xmlNode)
	{
		$this->setFontName($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_FONTNAME));
		$this->setFontSize($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_FONTSIZE));
		$this->setFontStyle($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_FONTSTYLE));
		$this->setFontWeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_FONTWEIGHT));
		$this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_COLOR));
		$this->setColorMapIndex($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_COLORMAPINDEX));
	}
}

?>