Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLayoutNodeClass.php 2.89 KB
22521f1c   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
<?php

define ("REQUESTOUTPUTPLOTLAYOUT_NAME", "layout");
define ("REQUESTOUTPUTPLOTLAYOUT_TYPE", "type");
define ("REQUESTOUTPUTPLOTLAYOUT_PANELHEIGHT", "panelHeight");
define ("REQUESTOUTPUTPLOTLAYOUT_PANELSPACING", "panelSpacing");
define ("REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR", "firstPanelHeightFactor");
define ("REQUESTOUTPUTPLOTLAYOUT_EXPAND", "expand");
abfcb76c   Benjamin Renard   Add layout proper...
9
define ("REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND", "onlyLowerTimeAxesLegend");
22521f1c   Benjamin Renard   First commit
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

abstract class RequestOutputPlotLayoutTypeEnum
{
	const MANUAL   = "manual";
	const AUTO     = "auto";
	const VERTICAL = "vertical";
}

/**
 * @class RequestOutputPlotLayoutNodeClass
 * @brief Definition of a layout for a page of a plot request
 * @details
 */
class RequestOutputPlotLayoutNodeClass extends NodeClass
{
	public function __construct()
	{
		parent::__construct(REQUESTOUTPUTPLOTLAYOUT_NAME);
	}
	
	public function setType($type)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_TYPE, $type);
	}

	public function getType()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_TYPE);
	}
	
	public function setPanelHeight($height)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_PANELHEIGHT, $height);
	}
	
	public function getPanelHeight()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_PANELHEIGHT);
	}
	
	public function setPanelSpacing($spacing)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_PANELSPACING, $spacing);
	}
	
	public function getPanelSpacing()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_PANELSPACING);
	}
	
	public function setFirstPanelHeightFactor($factor)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR, $factor);
	}
	
	public function getFirstPanelHeightFactor()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR);
	}
	
	public function setExpand($expand)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_EXPAND, $expand);
	}
	
	public function getExpand()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_EXPAND);
	}
abfcb76c   Benjamin Renard   Add layout proper...
79
80
81
82
83

	public function setOnlyLowerTimeAxesLegend($onlyLower)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND, $onlyLower);
	}
966bd5f8   Benjamin Renard   Add request to ge...
84
	
abfcb76c   Benjamin Renard   Add layout proper...
85
86
87
88
89
	public function getOnlyLowerTimeAxesLegend()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND);
	}

966bd5f8   Benjamin Renard   Add request to ge...
90
91
92
93
94
95
96
	public function loadFromNode($xmlNode)
	{
		$this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_TYPE));
		$this->setPanelHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_PANELHEIGHT));
		$this->setPanelSpacing($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_PANELSPACING));
		$this->setFirstPanelHeightFactor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR));
		$this->setExpand($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_EXPAND));
abfcb76c   Benjamin Renard   Add layout proper...
97
		$this->setOnlyLowerTimeAxesLegend($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND));
966bd5f8   Benjamin Renard   Add request to ge...
98
	}
22521f1c   Benjamin Renard   First commit
99
100
101
}
?>
	
abfcb76c   Benjamin Renard   Add layout proper...
102