PageRenderTime 65ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

/pyjs/tests/test005.py

http://pyjamas.googlecode.com/
Python | 27 lines | 16 code | 11 blank | 0 comment | 0 complexity | c5d8b0a76a5de851ee362a07261c0fe6 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. import DOM
  2. class UIObject:
  3. def getElement(self):
  4. return self.element
  5. def setElement(self, element):
  6. self.element = element
  7. class Widget(UIObject):
  8. pass
  9. class FocusWidget(Widget):
  10. def __init__(self, element):
  11. self.setElement(element)
  12. class ButtonBase(FocusWidget):
  13. def __init__(self, element):
  14. FocusWidget.__init__(self, element)
  15. def setHTML(self, html):
  16. DOM.setInnerHTML(self.getElement(), html)