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
7 class SubmitPanel(VerticalPanel):
8 def __init__(self, sfadata):
9 VerticalPanel.__init__(self)
10 self.sfadata = sfadata
13 hp1 = HorizontalPanel()
15 hp1.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
16 b1 = Button("Apply", self.apply)
18 hp1.add(HTML("Apply the configured changes to the slice"))
20 hp2 = HorizontalPanel()
22 hp2.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
23 b2 = Button("Reset", self.reset)
25 hp2.add(HTML("Reset the local slice configuration"))
29 self.setStyleName("ks-layouts")
34 def apply(self, sender):
35 self.sfadata.applyRSpec()
37 def reset(self, sender):
38 self.sfadata.refreshRSpec()