Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementXYNodeClass.php 1.86 KB
22521f1c   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

require_once("RequestOutputPlotElementNodeClass.php");

define ("REQUESTOUTPUTPLOTELEMENTXY_NAME", "xyPlot");
define ("REQUESTOUTPUTPLOTELEMENTXY_ISOTROPIC", "isotropic");
define ("REQUESTOUTPUTPLOTELEMENTXY_XAXISID", "xaxis_id");

/**
 * @class RequestOutputPlotElementXYNodeClass
 * @brief Definition of a XY plot element for a panel of a plot request
 * @details
*/
class RequestOutputPlotElementXYNodeClass extends RequestOutputPlotElementNodeClass
{
	public function __construct()
	{
17f69bd1   Benjamin Renard   Add tick plot and...
18
		parent::__construct(REQUESTOUTPUTPLOTELEMENTXY_NAME,true,true,false,false,false,false);
22521f1c   Benjamin Renard   First commit
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
		//create x axis
		$this->getAxes()->addDigitalAxis(RequestOutputPlotAxisTypeEnum::XAXIS,REQUESTOUTPUTPLOTELEMENTXY_XAXISID);
		//force color axis creation
		$this->getAxes()->getColorAxis();
		//default attributes
		$this->setIsIsotropic(false);
	}

	public function setIsIsotropic($isIsotropic)
	{
		if ($isIsotropic)
			$this->setAttribute(REQUESTOUTPUTPLOTELEMENTXY_ISOTROPIC, "true");
		else
			$this->setAttribute(REQUESTOUTPUTPLOTELEMENTXY_ISOTROPIC, "false");
	}

	public function getIsIsotropic()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTXY_ISOTROPIC);
	}

	public function getXAxis()
	{
		return $this->getAxes()->getDigitalAxis(RequestOutputPlotAxisTypeEnum::XAXIS,REQUESTOUTPUTPLOTELEMENTXY_XAXISID);
	}

	public function addYAxis($id)
	{
		return $this->getAxes()->addDigitalAxis(RequestOutputPlotAxisTypeEnum::YAXIS,$id);
	}

	public function getYAxis($id)
	{
		return $this->getAxes()->getDigitalAxis(RequestOutputPlotAxisTypeEnum::YAXIS,$id);
	}

	public function getZAxis()
	{
		return $this->getAxes()->getColorAxis();
	}
966bd5f8   Benjamin Renard   Add request to ge...
59
60
61
62
63
64
	
	public function loadFromNode($xmlNode)
	{
		$this->setIsIsotropic($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTXY_ISOTROPIC) == "true");
		parent::loadFromNode($xmlNode);
	}
22521f1c   Benjamin Renard   First commit
65
66
67
}

?>