RequestOutputPlotIntervalsNodeClass.php
960 Bytes
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
<?php
define("REQUESTOUTPUTPLOTINTERVALS_NAME", "intervals");
define("REQUESTOUTPUTPLOTINTERVALS_COLOR", "color");
/**
* @class RequestOutputPlotTextLegendNodeClass
* @brief Definition of a "text legend" element for a plot
* @details
*/
class RequestOutputPlotIntervalsNodeClass extends NodeClass
{
public $textLegendNode = null;
public function __construct()
{
parent::__construct(REQUESTOUTPUTPLOTINTERVALS_NAME);
}
public function setColor($color)
{
$this->setAttribute(REQUESTOUTPUTPLOTINTERVALS_COLOR, $color);
}
public function getColor()
{
return $this->getAttribute(REQUESTOUTPUTPLOTINTERVALS_COLOR);
}
public function addTextLegend()
{
$this->textLegendNode = new RequestOutputPlotTextLegendNodeClass();
$this->addChild($this->textLegendNode);
return $this->textLegendNode;
}
public function loadFromNode($xmlNode)
{
$this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTINTERVALS_COLOR));
}
}