Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementTickNodeClass.php 1.17 KB
17f69bd1   Benjamin Renard   Add tick plot and...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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);
	}
966bd5f8   Benjamin Renard   Add request to ge...
39
40
41
42
43
44
	
	public function loadFromNode($xmlNode)
	{
		$this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTTICK_FORMAT));
		parent::loadFromNode($xmlNode);
	}
17f69bd1   Benjamin Renard   Add tick plot and...
45
46
47
}

?>