Broke out PLE, PLJ, GpENI into separate tabs. For now, make as few assumptions as...
[sfa-gui.git] / SubmitPanel.py
1 from pyjamas.ui.VerticalPanel import VerticalPanel
2 from pyjamas.ui.HorizontalPanel import HorizontalPanel
3 from pyjamas.ui.Button import Button
4 from pyjamas.ui.HTML import HTML
5 from pyjamas.ui import HasAlignment
6
7 class SubmitPanel(VerticalPanel):
8     def __init__(self, sfadata):
9         VerticalPanel.__init__(self)
10         self.sfadata = sfadata
11         self.setSpacing(10)
12         
13         hp1 = HorizontalPanel()
14         hp1.setSpacing(10)
15         hp1.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
16         b1 = Button("Apply", self.apply)
17         hp1.add(b1)
18         hp1.add(HTML("Apply the configured changes to the slice"))
19                 
20         hp2 = HorizontalPanel()
21         hp2.setSpacing(10)
22         hp2.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
23         b2 = Button("Reset", self.reset)
24         hp2.add(b2)
25         hp2.add(HTML("Reset the local slice configuration"))
26         
27         self.add(hp1)
28         self.add(hp2)
29         
30     def refresh(self):
31         pass
32                     
33     def apply(self, sender):
34         self.sfadata.applyRSpec()
35
36     def reset(self, sender):
37         self.sfadata.refreshRSpec()
38         
39
40