Commit a88159f7ebcedd4f872c69d2a6aa83c4afd3ee27

Authored by Benjamin Renard
1 parent 063337d8

Add panel index support

src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -376,6 +376,9 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
376 376 if (isset($panelData->{'id'}))
377 377 $panelNode->setId($panelData->{'id'});
378 378  
  379 + if (isset($panelData->{'panel-index'}))
  380 + $panelNode->setIndex($panelData->{'panel-index'});
  381 +
379 382 //Panel background color
380 383 if (($panelData->{'panel-background-color'} != 'none') && ($panelData->{'panel-background-color'} != ''))
381 384 $panelNode->setBackgroundColor($this->hexColor2KernelColor($panelData->{'panel-background-color'}));
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotPanelNodeClass.php
... ... @@ -15,6 +15,7 @@ define ("REQUESTOUTPUTPLOTPANEL_XMARGIN", "xMargin");
15 15 define ("REQUESTOUTPUTPLOTPANEL_PREFEREDWIDTH", "preferedWidth");
16 16 define ("REQUESTOUTPUTPLOTPANEL_PREFEREDHEIGHT", "preferedHeight");
17 17 define ("REQUESTOUTPUTPLOTPANEL_ID", "id");
  18 +define ("REQUESTOUTPUTPLOTPANEL_INDEX", "index");
18 19  
19 20 abstract class RequestOutputPlotElementTypeEnum
20 21 {
... ... @@ -156,6 +157,16 @@ class RequestOutputPlotPanelNodeClass extends NodeClass
156 157 return $this->getAttribute(REQUESTOUTPUTPLOTPANEL_ID);
157 158 }
158 159  
  160 + public function setIndex($index)
  161 + {
  162 + $this->setAttribute(REQUESTOUTPUTPLOTPANEL_INDEX, $index);
  163 + }
  164 +
  165 + public function getIndex()
  166 + {
  167 + return $this->getAttribute(REQUESTOUTPUTPLOTPANEL_INDEX);
  168 + }
  169 +
159 170 public function loadFromNode($xmlNode)
160 171 {
161 172 $this->setBackgroundColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_BACKGROUNDCOLOR));
... ...