RequestOutputPlotElementTickNodeClass.php
1.17 KB
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
<?php
require_once("RequestOutputPlotElementNodeClass.php");
define ("REQUESTOUTPUTPLOTELEMENTTICK_NAME", "tickPlot");
define ("REQUESTOUTPUTPLOTELEMENTTICK_FORMAT", "format");
/**
* @class RequestOutputPlotElementTickNodeClass
* @brief Definition of a tick plot element for a panel of a plot request
* @details
*/
class RequestOutputPlotElementTickNodeClass extends RequestOutputPlotElementNodeClass
{
public function __construct($noAxis)
{
parent::__construct(REQUESTOUTPUTPLOTELEMENTTICK_NAME,false,false,false,$noAxis,true,true);
if (!$noAxis)
//force time axis creation
$this->getAxes()->getTimeAxis();
}
public function getTimeAxis()
{
if ($this->getAxes() == NULL)
return NULL;
return $this->getAxes()->getTimeAxis();
}
public function setFormat($format)
{
$this->setAttribute(REQUESTOUTPUTPLOTELEMENTTICK_FORMAT, $format);
}
public function getFormat()
{
return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTTICK_FORMAT);
}
public function loadFromNode($xmlNode)
{
$this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTTICK_FORMAT));
parent::loadFromNode($xmlNode);
}
}
?>