RequestOutputPlotTitleNodeClass.php 2.55 KB
<?php

require_once("RequestOutputPlotTitleNodeClass.php");

abstract class RequestOutputPlotTitlePosition
{
	const TOP    = "top";
	const BOTTOM = "bottom";
}

abstract class RequestOutputPlotTitleAlign
{
	const CENTER = "center";
	const LEFT   = "left";
	const RIGHT  = "right";
}

define ("REQUESTOUTPUTPLOTTITLE_NAME", "title");
define ("REQUESTOUTPUTPLOTTITLE_POSITION", "position");
define ("REQUESTOUTPUTPLOTTITLE_ALIGN", "align");
define ("REQUESTOUTPUTPLOTTITLE_FONTNAME", "fontName");
define ("REQUESTOUTPUTPLOTTITLE_FONTSIZE", "fontSize");
define ("REQUESTOUTPUTPLOTTITLE_STYLE", "style");
define ("REQUESTOUTPUTPLOTTITLE_COLOR", "color");
define ("REQUESTOUTPUTPLOTTITLE_COLORMAPINDEX", "colorMapIndex");

/**
 * @class RequestOutputPlotTitleNodeClass
 * @brief Definition of a title for a plot request
 * @details
*/
class RequestOutputPlotTitleNodeClass extends NodeClass
{
	public function __construct()
	{
		parent::__construct(REQUESTOUTPUTPLOTTITLE_NAME);
	}

	public function setText($text)
	{
		$this->setValue($text);
	}
	
	public function getText()
	{
		return $this->getValue();
	}
	
	public function setPosition($position)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_POSITION, $position);
	}
	
	public function getPosition()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_POSITION);
	}
	
	public function setAlign($align)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_ALIGN, $align);
	}
	
	public function getAlign()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_ALIGN);
	}
	
	public function setFontName($fontName)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_FONTNAME, $fontName);
	}
	
	public function getFontName()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_FONTNAME);
	}

	public function setFontSize($fontSize)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_FONTSIZE, $fontSize);
	}
	
	public function getFontSize()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_FONTSIZE);
	}
	
	public function setFontStyle($style)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_STYLE, $style);
	}
	
	public function getFontStyle()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_STYLE);
	}
	
	public function setColor($color)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_COLOR, $color);
	}
	
	public function getColor()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_COLOR);
	}
	
	public function setColorMapIndex($colorMapIndex)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTTITLE_COLORMAPINDEX, $colorMapIndex);
	}
	
	public function getColorMapIndex()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_COLORMAPINDEX);
	}
}

?>