RequestOutputPlotTitleNodeClass.php
1.55 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
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
<?php
require_once("RequestOutputPlotTitleNodeClass.php");
abstract class RequestOutputPlotTitlePosition
{
const TOP = "top";
const BOTTOM = "bottom";
}
abstract class RequestOutputPlotTitleAlign
{
const CENTER = "center";
const LEFT = "left";
const RIGHT = "right";
}
define ("REQUESTOUTPUTPLOTTITLE_NAME", "title");
define ("REQUESTOUTPUTPLOTTITLE_POSITION", "position");
define ("REQUESTOUTPUTPLOTTITLE_ALIGN", "align");
/**
* @class RequestOutputPlotTitleNodeClass
* @brief Definition of a title for a plot request
* @details
*/
class RequestOutputPlotTitleNodeClass extends RequestOutputPlotLabelNodeClass
{
public function __construct()
{
parent::__construct(REQUESTOUTPUTPLOTTITLE_NAME);
}
public function setText($text)
{
$this->setValue($text);
}
public function getText()
{
return $this->getValue();
}
public function setPosition($position)
{
$this->setAttribute(REQUESTOUTPUTPLOTTITLE_POSITION, $position);
}
public function getPosition()
{
return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_POSITION);
}
public function setAlign($align)
{
$this->setAttribute(REQUESTOUTPUTPLOTTITLE_ALIGN, $align);
}
public function getAlign()
{
return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_ALIGN);
}
public function loadFromNode($xmlNode)
{
$this->setText($this->getXmlNodeValue($xmlNode));
$this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTITLE_POSITION));
$this->setAlign($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTITLE_ALIGN));
parent::loadFromNode($xmlNode);
}
}
?>