PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/examples/kitchensink/Info.py

http://pyjamas.googlecode.com/
Python | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | c8db37bb85b1930345826f2f38ae6d20 MD5 | raw file
 1from Sink import Sink, SinkInfo
 2from ui import HTML
 3
 4class Info(Sink):
 5    def __init__(self):
 6        text="<div class='infoProse'>This is the Kitchen Sink sample.  "
 7        text+="It demonstrates many of the widgets in the Google Web Toolkit."
 8        text+="<p>This sample also demonstrates something else really useful in GWT: "
 9        text+="history support.  "
10        text+="When you click on a link at the left, the location bar will be "
11        text+="updated with the current <i>history token</i>, which keeps the app "
12        text+="in a bookmarkable state.  The back and forward buttons work properly "
13        text+="as well.  Finally, notice that you can right-click a link and 'open "
14        text+="in new window' (or middle-click for a new tab in Firefox).</p></div>"
15        self.initWidget(HTML(text, True))
16
17    def onShow(self):
18        pass
19
20
21def init():
22    return SinkInfo("Info", "Introduction to the Kitchen Sink.", Info)