+from pyjamas.ui.VerticalPanel import VerticalPanel
+from pyjamas.ui.HorizontalPanel import HorizontalPanel
+from pyjamas.ui.Button import Button
+from pyjamas.ui.HTML import HTML
+from pyjamas.ui import HasAlignment
+
+class SubmitPanel(VerticalPanel):
+ def __init__(self, sfadata):
+ VerticalPanel.__init__(self)
+ self.sfadata = sfadata
+ self.setSpacing(10)
+
+ hp1 = HorizontalPanel()
+ hp1.setSpacing(10)
+ hp1.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
+ b1 = Button("Apply", self.apply)
+ hp1.add(b1)
+ hp1.add(HTML("Apply the configured changes to the slice"))
+
+ hp2 = HorizontalPanel()
+ hp2.setSpacing(10)
+ hp2.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
+ b2 = Button("Reset", self.reset)
+ hp2.add(b2)
+ hp2.add(HTML("Reset the local slice configuration"))
+
+ self.add(hp1)
+ self.add(hp2)
+
+ def refresh(self):
+ pass
+
+ def apply(self, sender):
+ self.sfadata.applyRSpec()
+
+ def reset(self):
+ self.sfadata.refreshRSpec()
+
+
+