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