PageRenderTime 114ms CodeModel.GetById 111ms app.highlight 1ms 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
 1import DOM
 2
 3class UIObject:
 4
 5    def getElement(self):
 6        return self.element
 7
 8    def setElement(self, element):
 9        self.element = element
10
11
12class Widget(UIObject):
13    pass
14
15class FocusWidget(Widget):
16
17    def __init__(self, element):
18        self.setElement(element)
19
20
21class ButtonBase(FocusWidget):
22
23    def __init__(self, element):
24        FocusWidget.__init__(self, element)
25
26    def setHTML(self, html):
27        DOM.setInnerHTML(self.getElement(), html)