RequestOutputPlotElementTickNodeClass.php 1.17 KB
<?php

require_once("RequestOutputPlotElementNodeClass.php");

define ("REQUESTOUTPUTPLOTELEMENTTICK_NAME", "tickPlot");
define ("REQUESTOUTPUTPLOTELEMENTTICK_FORMAT", "format");

/**
 * @class RequestOutputPlotElementTickNodeClass
 * @brief Definition of a tick plot element for a panel of a plot request
 * @details
*/
class RequestOutputPlotElementTickNodeClass extends RequestOutputPlotElementNodeClass
{
	public function __construct($noAxis)
	{
		parent::__construct(REQUESTOUTPUTPLOTELEMENTTICK_NAME,false,false,false,$noAxis,true,true);
		if (!$noAxis)
			//force time axis creation
			$this->getAxes()->getTimeAxis();
	}

	public function getTimeAxis()
	{
		if ($this->getAxes() == NULL)
			return NULL;
		return $this->getAxes()->getTimeAxis();
	}
	
	public function setFormat($format)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTELEMENTTICK_FORMAT, $format);
	}
	
	public function getFormat()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTTICK_FORMAT);
	}
	
	public function loadFromNode($xmlNode)
	{
		$this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTTICK_FORMAT));
		parent::loadFromNode($xmlNode);
	}
}

?>