RequestOutputPlotElementInstantNodeClass.php 1.46 KB
<?php

require_once("RequestOutputPlotElementNodeClass.php");

define ("REQUESTOUTPUTPLOTELEMENTINSTANT_NAME", "instantPlot");
define ("REQUESTOUTPUTPLOTELEMENTINSTANT_TIME", "time");

/**
 * @class RequestOutputPlotElementInstantNodeClass
 * @brief Definition of an instant plot element for a panel of a plot request
 * @details
*/
class RequestOutputPlotElementInstantNodeClass extends RequestOutputPlotElementNodeClass
{
	public function __construct()
	{
		parent::__construct(REQUESTOUTPUTPLOTELEMENTINSTANT_NAME,true,true,true,false,false,false);
		//create x axis
		$this->getAxes()->addDigitalAxis(RequestOutputPlotAxisTypeEnum::XAXIS,REQUESTOUTPUTPLOTELEMENTXY_XAXISID);
		//force color axis creation
		$this->getAxes()->getColorAxis();
	}

	public function getXAxis()
	{
		return $this->getAxes()->getDigitalAxis(RequestOutputPlotAxisTypeEnum::XAXIS,REQUESTOUTPUTPLOTELEMENTXY_XAXISID);
	}

	public function addYAxis($id)
	{
		return $this->getAxes()->addDigitalAxis(RequestOutputPlotAxisTypeEnum::YAXIS,$id);
	}

	public function getYAxis($id)
	{
		return $this->getAxes()->getDigitalAxis(RequestOutputPlotAxisTypeEnum::YAXIS,$id);
	}

	public function getZAxis()
	{
		return $this->getAxes()->getColorAxis();
	}
	
	public function setTime($time)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTELEMENTINSTANT_TIME, $time);
	}
	
	public function getTime()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTINSTANT_TIME);
	}
}

?>