Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLayoutNodeClass.php 2.41 KB
22521f1c   Benjamin Renard   First commit
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?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");

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);
	}
966bd5f8   Benjamin Renard   Add request to ge...
78
79
80
81
82
83
84
85
86
	
	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));
	}
22521f1c   Benjamin Renard   First commit
87
88
89
90
}
?>