Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementStatusNodeClass.php 1.74 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php

require_once("RequestOutputPlotElementNodeClass.php");

define ("REQUESTOUTPUTPLOTELEMENTSTATUS_NAME", "statusPlot");
define ("REQUESTOUTPUTPLOTELEMENTSTATUS_POSITION", "position");
define ("REQUESTOUTPUTPLOTELEMENTSTATUS_COLORMAP", "colorMapIndex");

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

/**
 * @class RequestOutputPlotElementStatusNodeClass
 * @brief Definition of a status plot element for a panel of a plot request
 * @details
*/
class RequestOutputPlotElementStatusNodeClass extends RequestOutputPlotElementNodeClass
{
	public function __construct($noAxis)
	{
		parent::__construct(REQUESTOUTPUTPLOTELEMENTSTATUS_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 setPosition($position)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTELEMENTSTATUS_POSITION, $position);
	}
	
	public function getPosition()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTSTATUS_POSITION);
	}
	
	public function setColorMap($colorMapIndex)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTELEMENTSTATUS_COLORMAP, $colorMapIndex);
	}
	
	public function getColorMap()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTSTATUS_COLORMAP);
	}
966bd5f8   Benjamin Renard   Add request to ge...
56
57
58
59
60
61
62
	
	public function loadFromNode($xmlNode)
	{
		$this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTSTATUS_POSITION));
		$this->setColorMap($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTSTATUS_COLORMAP));
		parent::loadFromNode($xmlNode);
	}
17f69bd1   Benjamin Renard   Add tick plot and...
63
64
65
}

?>