Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotCurveNodeClass.php 1.47 KB
4ede4320   Benjamin Renard   Integration for s...
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

define ("REQUESTOUTPUTPLOTCURVE_STYLE", "style");
define ("REQUESTOUTPUTPLOTCURVE_WIDTH", "width");
define ("REQUESTOUTPUTPLOTCURVE_COLOR", "color");

abstract class RequestOutputPlotCurveStyleEnum
{
	const PLAIN         = "plain";
	const DOT           = "dot";
	const LONGSPACEDDOT = "long-spaced-dot";
	const LONGSHORTDOT  = "long-short-dot";
}

/**
 * @class RequestOutputPlotCurveNodeClass
 * @brief Definition of a curve element for a plot
 * @details
 */
class RequestOutputPlotCurveNodeClass extends NodeClass
{
	public function __construct($name)
	{
		parent::__construct($name);
	}

	public function setStyle($style)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTCURVE_STYLE, $style);
	}
	
	public function getStyle()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTCURVE_STYLE);
	}
	
	public function setWidth($width)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTCURVE_WIDTH, $width);
	}
	
	public function getWidth()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTCURVE_WIDTH);
	}
	
	public function setColor($color)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTCURVE_COLOR, $color);
	}
	
	public function getColor()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTCURVE_COLOR);
	}
966bd5f8   Benjamin Renard   Add request to ge...
56
57
58
59
60
61
62
	
	public function loadFromNode($xmlNode)
	{
		$this->setStyle($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVE_STYLE));
		$this->setWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVE_WIDTH));
		$this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVE_COLOR));
	}
4ede4320   Benjamin Renard   Integration for s...
63
64
65
}

?>