def __init__(self): Sink.__init__(self) self.fTabs = TabPanel() self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/JohannesElison.jpg"), "1634") self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/SelfPortrait1640.jpg"), "1640") self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/LaMarcheNocturne.jpg"), "1642") self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/TheReturnOfTheProdigalSon.jpg"), "1662") self.fTabs.selectTab(0) self.fTabs.setWidth("100%") self.fTabs.setHeight("100%") self.initWidget(self.fTabs)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") #panel.setHeight("100%") panel.setSpacing(5) title = HTML('<h1>Timer</h1>') description = HTML("""""") #panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML(""" <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Timer</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/Timer.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/Timer.py</a></font></td></tr></table> """) panel.add(head, DockPanel.NORTH) docs = HTML("""""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) #panel.setCellHeight(tp, "100%") classes = [ Proto('Timer'), ] class_content = { 'Timer': r'''<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="Timer">class <strong>Timer</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Timer-__init__"><strong>__init__</strong></a>(self, time, notify)</dt></dl> <dl><dt><a name="Timer-cancel"><strong>cancel</strong></a>(self)</dt></dl> <dl><dt><a name="Timer-getID"><strong>getID</strong></a>(self)</dt></dl> <dl><dt><a name="Timer-notify"><strong>notify</strong></a>(self, *args)</dt></dl> </td></tr></table>''', } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, 'Classes') functions = ['<dl><dt><a name="-timeout_add"><strong>timeout_add</strong></a>(...)</dt></dl>\n'] title = bigtitle('Functions') contents = section(title, 'functions', HTML('\n'.join(functions))) tp.add(contents, 'Functions') tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") #panel.setHeight("100%") panel.setSpacing(5) title = HTML('<h1>Location</h1>') description = HTML("""""") #panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML(""" <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Location</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/Location.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/Location.py</a></font></td></tr></table> """) panel.add(head, DockPanel.NORTH) docs = HTML("""""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) #panel.setCellHeight(tp, "100%") modules = [r'''<a href="docpyjslib.html">pyjslib</a>'''] contents = self.multicolumn(modules) title = bigtitle('Modules') contents = section(title, 'module', contents) tp.add(contents, 'Modules') classes = [ Proto('Location'), ] class_content = { 'Location': r'''<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="Location">class <strong>Location</strong></a></font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> <td colspan=2><tt>Retrieve this class by calling Window.getLocation().<br> <br> This provides a pyjs wrapper for the current location,<br> with some utility methods for convenience.<br> </tt></td></tr> <tr><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Location-__init__"><strong>__init__</strong></a>(self, location)</dt></dl> <dl><dt><a name="Location-getHash"><strong>getHash</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getHashDict"><strong>getHashDict</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getHost"><strong>getHost</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getHostname"><strong>getHostname</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getHref"><strong>getHref</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getPageHref"><strong>getPageHref</strong></a>(self)</dt><dd><tt>Return href with any search or hash stripped</tt></dd></dl> <dl><dt><a name="Location-getPathname"><strong>getPathname</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getPort"><strong>getPort</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getProtocol"><strong>getProtocol</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getSearch"><strong>getSearch</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getSearchDict"><strong>getSearchDict</strong></a>(self)</dt></dl> <dl><dt><a name="Location-getSearchVar"><strong>getSearchVar</strong></a>(self, key)</dt></dl> <dl><dt><a name="Location-reload"><strong>reload</strong></a>(self)</dt></dl> <dl><dt><a name="Location-setHash"><strong>setHash</strong></a>(self, hash)</dt></dl> <dl><dt><a name="Location-setHashDict"><strong>setHashDict</strong></a>(self, hashDict)</dt></dl> <dl><dt><a name="Location-setHref"><strong>setHref</strong></a>(self, href)</dt></dl> <dl><dt><a name="Location-setSearch"><strong>setSearch</strong></a>(self, search)</dt></dl> <dl><dt><a name="Location-setSearchDict"><strong>setSearchDict</strong></a>(self, searchDict)</dt></dl> </td></tr></table>''', } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, 'Classes') functions = ['<dl><dt><a name="-makeUrlDict"><strong>makeUrlDict</strong></a>(s)</dt></dl>\n', '<dl><dt><a name="-makeUrlStringFromDict"><strong>makeUrlStringFromDict</strong></a>(d)</dt></dl>\n'] title = bigtitle('Functions') contents = section(title, 'functions', HTML('\n'.join(functions))) tp.add(contents, 'Functions') tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
class Tabs(Sink): def __init__(self): Sink.__init__(self) self.fTabs = TabPanel() self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/JohannesElison.jpg"), "1634") self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/SelfPortrait1640.jpg"), "1640") self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/LaMarcheNocturne.jpg"), "1642") self.fTabs.add(self.createImage(self.baseURL() + "rembrandt/TheReturnOfTheProdigalSon.jpg"), "1662") self.fTabs.selectTab(0) self.fTabs.setWidth("100%") self.fTabs.setHeight("100%") self.initWidget(self.fTabs) def onShow(self): pass def createImage(self, imageUrl): image = Image(imageUrl) image.setStyleName("ks-images-Image") p = VerticalPanel() p.setHorizontalAlignment(HasAlignment.ALIGN_CENTER) p.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE) p.add(image) return p
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") # panel.setHeight("100%") panel.setSpacing(5) title = HTML("<h1>pyjslib</h1>") description = HTML("""""") # panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML( """ <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>pyjslib</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/pyjslib.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/pyjslib.py</a></font></td></tr></table> """ ) panel.add(head, DockPanel.NORTH) docs = HTML( """<tt># Copyright 2006 James Tauber and contributors<br> #<br> # Licensed under the Apache License, Version 2.0 (the "License");<br> # you may not use this file except in compliance with the License.<br> # You may obtain a copy of the License at<br> #<br> # <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br> #<br> # Unless required by applicable law or agreed to in writing, software<br> # distributed under the License is distributed on an "AS IS" BASIS,<br> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br> # See the License for the specific language governing permissions and<br> # limitations under the License.</tt>""" ) panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) # panel.setCellHeight(tp, "100%") classes = [Proto("Class"), Proto("Dict"), Proto("List", [Proto("Tuple"), Proto("Tuple")]), Proto("Object")] class_content = { "Tuple": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="Tuple">class <strong>Tuple</strong></a>(<a href="docpyjslib.html#List">List</a>)</font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Tuple-__init__"><strong>__init__</strong></a>(self, data)</dt></dl> <hr> Methods inherited from <a href="docpyjslib.html#List">List</a>:<br> <dl><dt><a name="Tuple-__contains__"><strong>__contains__</strong></a>(self, value)</dt></dl> <dl><dt><a name="Tuple-__delitem__"><strong>__delitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="Tuple-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="Tuple-__iter__"><strong>__iter__</strong></a>(self)</dt></dl> <dl><dt><a name="Tuple-__len__"><strong>__len__</strong></a>(self)</dt></dl> <dl><dt><a name="Tuple-__setitem__"><strong>__setitem__</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="Tuple-append"><strong>append</strong></a>(self, item)</dt></dl> <dl><dt><a name="Tuple-getArray"><strong>getArray</strong></a>(self)</dt><dd><tt>Access the javascript Array that is used internally by this <a href="#list">list</a></tt></dd></dl> <dl><dt><a name="Tuple-index"><strong>index</strong></a>(self, value, start<font color="#909090">=0</font>)</dt></dl> <dl><dt><a name="Tuple-insert"><strong>insert</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="Tuple-pop"><strong>pop</strong></a>(self, index<font color="#909090">=-1</font>)</dt></dl> <dl><dt><a name="Tuple-remove"><strong>remove</strong></a>(self, value)</dt></dl> <dl><dt><a name="Tuple-slice"><strong>slice</strong></a>(self, lower, upper)</dt></dl> <dl><dt><a name="Tuple-sort"><strong>sort</strong></a>(self, compareFunc<font color="#909090">=None</font>, keyFunc<font color="#909090">=None</font>, reverse<font color="#909090">=False</font>)</dt></dl> </td></tr></table>""", "list": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><strong>list</strong> = <a name="list">class List</a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="List-__contains__"><strong>__contains__</strong></a>(self, value)</dt></dl> <dl><dt><a name="List-__delitem__"><strong>__delitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="List-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="List-__init__"><strong>__init__</strong></a>(self, data<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="List-__iter__"><strong>__iter__</strong></a>(self)</dt></dl> <dl><dt><a name="List-__len__"><strong>__len__</strong></a>(self)</dt></dl> <dl><dt><a name="List-__setitem__"><strong>__setitem__</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="List-append"><strong>append</strong></a>(self, item)</dt></dl> <dl><dt><a name="List-getArray"><strong>getArray</strong></a>(self)</dt><dd><tt>Access the javascript Array that is used internally by this <a href="#list">list</a></tt></dd></dl> <dl><dt><a name="List-index"><strong>index</strong></a>(self, value, start<font color="#909090">=0</font>)</dt></dl> <dl><dt><a name="List-insert"><strong>insert</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="List-pop"><strong>pop</strong></a>(self, index<font color="#909090">=-1</font>)</dt></dl> <dl><dt><a name="List-remove"><strong>remove</strong></a>(self, value)</dt></dl> <dl><dt><a name="List-slice"><strong>slice</strong></a>(self, lower, upper)</dt></dl> <dl><dt><a name="List-sort"><strong>sort</strong></a>(self, compareFunc<font color="#909090">=None</font>, keyFunc<font color="#909090">=None</font>, reverse<font color="#909090">=False</font>)</dt></dl> </td></tr></table>""", "Object": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="Object">class <strong>Object</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%"></td></tr></table>""", "List": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="List">class <strong>List</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="List-__contains__"><strong>__contains__</strong></a>(self, value)</dt></dl> <dl><dt><a name="List-__delitem__"><strong>__delitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="List-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="List-__init__"><strong>__init__</strong></a>(self, data<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="List-__iter__"><strong>__iter__</strong></a>(self)</dt></dl> <dl><dt><a name="List-__len__"><strong>__len__</strong></a>(self)</dt></dl> <dl><dt><a name="List-__setitem__"><strong>__setitem__</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="List-append"><strong>append</strong></a>(self, item)</dt></dl> <dl><dt><a name="List-getArray"><strong>getArray</strong></a>(self)</dt><dd><tt>Access the javascript Array that is used internally by this <a href="#list">list</a></tt></dd></dl> <dl><dt><a name="List-index"><strong>index</strong></a>(self, value, start<font color="#909090">=0</font>)</dt></dl> <dl><dt><a name="List-insert"><strong>insert</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="List-pop"><strong>pop</strong></a>(self, index<font color="#909090">=-1</font>)</dt></dl> <dl><dt><a name="List-remove"><strong>remove</strong></a>(self, value)</dt></dl> <dl><dt><a name="List-slice"><strong>slice</strong></a>(self, lower, upper)</dt></dl> <dl><dt><a name="List-sort"><strong>sort</strong></a>(self, compareFunc<font color="#909090">=None</font>, keyFunc<font color="#909090">=None</font>, reverse<font color="#909090">=False</font>)</dt></dl> </td></tr></table>""", "tuple": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><strong>tuple</strong> = <a name="tuple">class Tuple</a>(<a href="docpyjslib.html#List">List</a>)</font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Tuple-__init__"><strong>__init__</strong></a>(self, data)</dt></dl> <hr> Methods inherited from <a href="docpyjslib.html#List">List</a>:<br> <dl><dt><a name="Tuple-__contains__"><strong>__contains__</strong></a>(self, value)</dt></dl> <dl><dt><a name="Tuple-__delitem__"><strong>__delitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="Tuple-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt></dl> <dl><dt><a name="Tuple-__iter__"><strong>__iter__</strong></a>(self)</dt></dl> <dl><dt><a name="Tuple-__len__"><strong>__len__</strong></a>(self)</dt></dl> <dl><dt><a name="Tuple-__setitem__"><strong>__setitem__</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="Tuple-append"><strong>append</strong></a>(self, item)</dt></dl> <dl><dt><a name="Tuple-getArray"><strong>getArray</strong></a>(self)</dt><dd><tt>Access the javascript Array that is used internally by this <a href="#list">list</a></tt></dd></dl> <dl><dt><a name="Tuple-index"><strong>index</strong></a>(self, value, start<font color="#909090">=0</font>)</dt></dl> <dl><dt><a name="Tuple-insert"><strong>insert</strong></a>(self, index, value)</dt></dl> <dl><dt><a name="Tuple-pop"><strong>pop</strong></a>(self, index<font color="#909090">=-1</font>)</dt></dl> <dl><dt><a name="Tuple-remove"><strong>remove</strong></a>(self, value)</dt></dl> <dl><dt><a name="Tuple-slice"><strong>slice</strong></a>(self, lower, upper)</dt></dl> <dl><dt><a name="Tuple-sort"><strong>sort</strong></a>(self, compareFunc<font color="#909090">=None</font>, keyFunc<font color="#909090">=None</font>, reverse<font color="#909090">=False</font>)</dt></dl> </td></tr></table>""", "dict": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><strong>dict</strong> = <a name="dict">class Dict</a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Dict-__contains__"><strong>__contains__</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-__delitem__"><strong>__delitem__</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-__init__"><strong>__init__</strong></a>(self, data<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="Dict-__iter__"><strong>__iter__</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-__len__"><strong>__len__</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-__setitem__"><strong>__setitem__</strong></a>(self, key, value)</dt></dl> <dl><dt><a name="Dict-get"><strong>get</strong></a>(self, key, default_value<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="Dict-getObject"><strong>getObject</strong></a>(self)</dt><dd><tt>Return the javascript <a href="#Object">Object</a> which this class uses to store dictionary keys and values</tt></dd></dl> <dl><dt><a name="Dict-has_key"><strong>has_key</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-iteritems"><strong>iteritems</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-iterkeys"><strong>iterkeys</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-itervalues"><strong>itervalues</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-keys"><strong>keys</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-setdefault"><strong>setdefault</strong></a>(self, key, default_value)</dt></dl> <dl><dt><a name="Dict-update"><strong>update</strong></a>(self, d)</dt></dl> <dl><dt><a name="Dict-values"><strong>values</strong></a>(self)</dt></dl> </td></tr></table>""", "Dict": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="Dict">class <strong>Dict</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Dict-__contains__"><strong>__contains__</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-__delitem__"><strong>__delitem__</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-__init__"><strong>__init__</strong></a>(self, data<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="Dict-__iter__"><strong>__iter__</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-__len__"><strong>__len__</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-__setitem__"><strong>__setitem__</strong></a>(self, key, value)</dt></dl> <dl><dt><a name="Dict-get"><strong>get</strong></a>(self, key, default_value<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="Dict-getObject"><strong>getObject</strong></a>(self)</dt><dd><tt>Return the javascript <a href="#Object">Object</a> which this class uses to store dictionary keys and values</tt></dd></dl> <dl><dt><a name="Dict-has_key"><strong>has_key</strong></a>(self, key)</dt></dl> <dl><dt><a name="Dict-iteritems"><strong>iteritems</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-iterkeys"><strong>iterkeys</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-itervalues"><strong>itervalues</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-keys"><strong>keys</strong></a>(self)</dt></dl> <dl><dt><a name="Dict-setdefault"><strong>setdefault</strong></a>(self, key, default_value)</dt></dl> <dl><dt><a name="Dict-update"><strong>update</strong></a>(self, d)</dt></dl> <dl><dt><a name="Dict-values"><strong>values</strong></a>(self)</dt></dl> </td></tr></table>""", "Class": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="Class">class <strong>Class</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Class-__init__"><strong>__init__</strong></a>(self, name)</dt></dl> <dl><dt><a name="Class-__str___"><strong>__str___</strong></a>(self)</dt></dl> </td></tr></table>""", } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, "Classes") functions = [ '<dl><dt><a name="-cmp"><strong>cmp</strong></a>(a, b)</dt></dl>\n', '<dl><dt><a name="-dir"><strong>dir</strong></a>(obj)</dt></dl>\n', '<dl><dt><a name="-filter"><strong>filter</strong></a>(obj, method, sequence<font color="#909090">=None</font>)</dt></dl>\n', '<dl><dt><a name="-getattr"><strong>getattr</strong></a>(obj, method)</dt></dl>\n', '<dl><dt><a name="-hasattr"><strong>hasattr</strong></a>(obj, method)</dt></dl>\n', '<dl><dt><a name="-hash"><strong>hash</strong></a>(obj)</dt></dl>\n', '<dl><dt><a name="-isArray"><strong>isArray</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-isFunction"><strong>isFunction</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-isIteratable"><strong>isIteratable</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-isNull"><strong>isNull</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-isNumber"><strong>isNumber</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-isObject"><strong>isObject</strong></a>(a)</dt><dd><tt># type functions from Douglas Crockford\'s Remedial Javascript: <a href="http://www.crockford.com/javascript/remedial.html">http://www.crockford.com/javascript/remedial.html</a></tt></dd></dl>\n', '<dl><dt><a name="-isString"><strong>isString</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-isUndefined"><strong>isUndefined</strong></a>(a)</dt></dl>\n', '<dl><dt><a name="-len"><strong>len</strong></a>(object)</dt></dl>\n', '<dl><dt><a name="-map"><strong>map</strong></a>(obj, method, sequence<font color="#909090">=None</font>)</dt></dl>\n', '<dl><dt><a name="-printFunc"><strong>printFunc</strong></a>(objs)</dt></dl>\n', '<dl><dt><a name="-range"><strong>range</strong></a>()</dt><dd><tt># taken from mochikit: <a href="#-range">range</a>( [start,] stop[, step] )</tt></dd></dl>\n', '<dl><dt><a name="-slice"><strong>slice</strong></a>(object, lower, upper)</dt></dl>\n', '<dl><dt><a name="-toJSObjects"><strong>toJSObjects</strong></a>(x)</dt><dd><tt>Convert the pyjs pythonic <a href="#List">List</a> and <a href="#Dict">Dict</a> objects into javascript <a href="#Object">Object</a> and Array<br>\nobjects, recursively.</tt></dd></dl>\n', ] title = bigtitle("Functions") contents = section(title, "functions", HTML("\n".join(functions))) tp.add(contents, "Functions") data = [r"""<strong>next_hash_id</strong> = 0"""] title = bigtitle("Data") contents = section(title, "data", HTML("\n".join(data))) tp.add(contents, "Data") tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") #panel.setHeight("100%") panel.setSpacing(5) title = HTML('<h1>History</h1>') description = HTML("""""") #panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML(""" <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>History</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/History.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/History.py</a></font></td></tr></table> """) panel.add(head, DockPanel.NORTH) docs = HTML("""""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) #panel.setCellHeight(tp, "100%") classes = [ Proto('History'), ] class_content = { 'History': r'''<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="History">class <strong>History</strong></a></font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> <td colspan=2><tt>Simple <a href="#History">History</a> management class for back/forward button support.<br> <br> This class allows your AJAX application to use a history. Each time you<br> call <a href="#History-newItem">newItem</a>(), a new item is added to the history and the history<br> listeners are notified. If the user clicks the browser's forward or back <br> buttons, the appropriate item (a string passed to newItem) is fetched<br> from the history and the history listeners are notified.<br> <br> The address bar of the browser contains the current token, using <br> the "#" seperator (for implementation reasons, not because we love <br> the # mark).<br> <br> You may want to check whether the hash already contains a history<br> token when the page loads and use that to show appropriate content;<br> this allows users of the site to store direct links in their<br> bookmarks or send them in emails.<br> <br> To make this work properly in all browsers, you must add a specially<br> named iframe to your html page, like this:<br> <br> <iframe id='__pygwt_historyFrame' style='width:0;height:0;border:0'></iframe><br> </tt></td></tr> <tr><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="History-addHistoryListener"><strong>addHistoryListener</strong></a>(self, listener)</dt></dl> <dl><dt><a name="History-back"><strong>back</strong></a>(self)</dt></dl> <dl><dt><a name="History-fireHistoryChangedAndCatch"><strong>fireHistoryChangedAndCatch</strong></a>(self)</dt><dd><tt># TODO</tt></dd></dl> <dl><dt><a name="History-fireHistoryChangedImpl"><strong>fireHistoryChangedImpl</strong></a>(self, historyToken)</dt></dl> <dl><dt><a name="History-forward"><strong>forward</strong></a>(self)</dt></dl> <dl><dt><a name="History-getToken"><strong>getToken</strong></a>(self)</dt></dl> <dl><dt><a name="History-newItem"><strong>newItem</strong></a>(self, historyToken)</dt></dl> <dl><dt><a name="History-onHistoryChanged"><strong>onHistoryChanged</strong></a>(self, historyToken)</dt><dd><tt># TODO - fireHistoryChangedAndCatch not implemented</tt></dd></dl> <dl><dt><a name="History-removeHistoryListener"><strong>removeHistoryListener</strong></a>(self, listener)</dt></dl> </td></tr></table>''', } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, 'Classes') functions = ['<dl><dt><a name="-init"><strong>init</strong></a>()</dt></dl>\n'] title = bigtitle('Functions') contents = section(title, 'functions', HTML('\n'.join(functions))) tp.add(contents, 'Functions') data = [r'''<strong>historyListeners</strong> = []''',r'''<strong>historyToken</strong> = '''''] title = bigtitle('Data') contents = section(title, 'data', HTML('\n'.join(data))) tp.add(contents, 'Data') tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") # panel.setHeight("100%") panel.setSpacing(5) title = HTML("<h1>HTTPRequest</h1>") description = HTML("""""") # panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML( """ <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>HTTPRequest</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/HTTPRequest.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/HTTPRequest.py</a></font></td></tr></table> """ ) panel.add(head, DockPanel.NORTH) docs = HTML("""""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) # panel.setCellHeight(tp, "100%") modules = [r"""<a href="docpyjamas.Cookies.html">pyjamas.Cookies</a>""", r"""<a href="docsys.html">sys</a>"""] contents = self.multicolumn(modules) title = bigtitle("Modules") contents = section(title, "module", contents) tp.add(contents, "Modules") classes = [Proto("HTTPRequest")] class_content = { "HTTPRequest": r"""<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="HTTPRequest">class <strong>HTTPRequest</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="HTTPRequest-asyncGet"><strong>asyncGet</strong></a>(self, user, pwd, url, handler)</dt><dd><tt># also callable as: <a href="#HTTPRequest-asyncGet">asyncGet</a>(self, url, handler)</tt></dd></dl> <dl><dt><a name="HTTPRequest-asyncGetImpl"><strong>asyncGetImpl</strong></a>(self, user, pwd, url, handler)</dt></dl> <dl><dt><a name="HTTPRequest-asyncPost"><strong>asyncPost</strong></a>(self, user, pwd, url, postData<font color="#909090">=None</font>, handler<font color="#909090">=None</font>)</dt><dd><tt># also callable as: <a href="#HTTPRequest-asyncPost">asyncPost</a>(self, url, postData, handler)</tt></dd></dl> <dl><dt><a name="HTTPRequest-asyncPostImpl"><strong>asyncPostImpl</strong></a>(self, user, pwd, url, postData, handler)</dt></dl> <dl><dt><a name="HTTPRequest-createXmlHTTPRequest"><strong>createXmlHTTPRequest</strong></a>(self)</dt></dl> <dl><dt><a name="HTTPRequest-doCreateXmlHTTPRequest"><strong>doCreateXmlHTTPRequest</strong></a>(self)</dt></dl> <dl><dt><a name="HTTPRequest-onReadyStateChange"><strong>onReadyStateChange</strong></a>(self, xmlHttp, event, ignorearg)</dt></dl> </td></tr></table>""" } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, "Classes") tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
def __init__(self): TabPanel.__init__(self, DecoratedTabBar()) self.setStyleName(self.DEFAULT_STYLENAME) self.getTabBar().setStyleName(DecoratedTabBar.STYLENAME_DEFAULT)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") #panel.setHeight("100%") panel.setSpacing(5) title = HTML('<h1>EventDelegate</h1>') description = HTML("""""") #panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML(""" <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>EventDelegate</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/EventDelegate.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/EventDelegate.py</a></font></td></tr></table> """) panel.add(head, DockPanel.NORTH) docs = HTML("""""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) #panel.setCellHeight(tp, "100%") classes = [ Proto('EventDelegate'), ] class_content = { 'EventDelegate': r'''<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="EventDelegate">class <strong>EventDelegate</strong></a></font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> <td colspan=2><tt>Create the equivalent of a bound method. This also prepends extra <br> args, if any, to the called method's argument list when it calls it.<br> <br> Pass the method name you want to implement (javascript doesn't<br> support callables).<br> <br> @type args: list<br> @param args: If given, the arguments will be prepended to the <br> arguments passed to the event callback<br> </tt></td></tr> <tr><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="EventDelegate-__init__"><strong>__init__</strong></a>(self, eventMethodName, obj, method, *args)</dt></dl> <dl><dt><a name="EventDelegate-onEvent"><strong>onEvent</strong></a>(self, *args)</dt></dl> </td></tr></table>''', } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, 'Classes') tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") #panel.setHeight("100%") panel.setSpacing(5) title = HTML('<h1>JSONParser</h1>') description = HTML("""""") #panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML(""" <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>JSONParser</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/JSONParser.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/JSONParser.py</a></font></td></tr></table> """) panel.add(head, DockPanel.NORTH) docs = HTML("""<tt>This module contains a JSON Parser class<br> <br> JSONEncode:<br> +---------------+-------------------+---------------+<br> | PYGWT | Python | JSON |<br> +===============+===================+===============+<br> | pyjslib_Dict | dict | object |<br> +---------------+-------------------+---------------+<br> | pyjslib_List | list, tuple | array |<br> +---------------+-------------------+---------------+<br> | string | str, unicode | string |<br> +---------------+-------------------+---------------+<br> | number | int, long, float | number |<br> +---------------+-------------------+---------------+<br> | true | True | true |<br> +---------------+-------------------+---------------+<br> | false | False | false |<br> +---------------+-------------------+---------------+<br> | null | None | null |<br> +---------------+-------------------+---------------+<br> <br> <br> JSONDecode:<br> +---------------+-------------------+--------------+<br> | JSON | Python | PYGWT |<br> +===============+===================+==============+<br> | object | dict | pyjslib_Dict |<br> +---------------+-------------------+--------------+<br> | array | list | pyjslib_List |<br> +---------------+-------------------+--------------+<br> | string | unicode | string |<br> +---------------+-------------------+--------------+<br> | number (int) | int, long | number |<br> +---------------+-------------------+--------------+<br> | number (real) | float | number |<br> +---------------+-------------------+--------------+<br> | true | True | true |<br> +---------------+-------------------+--------------+<br> | false | False | false |<br> +---------------+-------------------+--------------+<br> | null | None | null |<br> +---------------+-------------------+--------------+</tt>""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) #panel.setCellHeight(tp, "100%") classes = [ Proto('JSONParser'), ] class_content = { 'JSONParser': r'''<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="JSONParser">class <strong>JSONParser</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="JSONParser-decode"><strong>decode</strong></a>(self, str)</dt></dl> <dl><dt><a name="JSONParser-decodeAsObject"><strong>decodeAsObject</strong></a>(self, str)</dt></dl> <dl><dt><a name="JSONParser-encode"><strong>encode</strong></a>(self, obj)</dt></dl> <dl><dt><a name="JSONParser-jsObjectToPy"><strong>jsObjectToPy</strong></a>(self, obj)</dt></dl> <dl><dt><a name="JSONParser-jsObjectToPyObject"><strong>jsObjectToPyObject</strong></a>(self, obj)</dt><dd><tt># TODO: __init__ parameters</tt></dd></dl> <dl><dt><a name="JSONParser-parseJSON"><strong>parseJSON</strong></a>(self, str)</dt></dl> <dl><dt><a name="JSONParser-toJSONString"><strong>toJSONString</strong></a>(self, obj)</dt><dd><tt># modified to detect __pyjslib_List & __pyjslib_Dict</tt></dd></dl> </td></tr></table>''', } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, 'Classes') tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)
def onModuleLoad(self): Window.addWindowResizeListener(self) panel = DockPanel() RootPanel().add(panel) self.panel = panel panel.setWidth("100%") #panel.setHeight("100%") panel.setSpacing(5) title = HTML('<h1>DeferredCommand</h1>') description = HTML("""""") #panel.add(title, DockPanel.NORTH) panel.add(description, DockPanel.NORTH) links = VerticalPanel() links.setSpacing(8) panel.add(links, DockPanel.NORTH) head = HTML(""" <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>DeferredCommand</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/DeferredCommand.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/pyjamas/DeferredCommand.py</a></font></td></tr></table> """) panel.add(head, DockPanel.NORTH) docs = HTML("""""") panel.add(docs, DockPanel.NORTH) tp = TabPanel() tp.setWidth("100%") self.tp = tp panel.add(tp, DockPanel.SOUTH) #panel.setCellHeight(tp, "100%") classes = [ Proto('DeferredCommand'), ] class_content = { 'DeferredCommand': r'''<p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="DeferredCommand">class <strong>DeferredCommand</strong></a></font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="DeferredCommand-add"><strong>add</strong></a>(self, cmd)</dt></dl> <dl><dt><a name="DeferredCommand-flushDeferredCommands"><strong>flushDeferredCommands</strong></a>(self)</dt></dl> <dl><dt><a name="DeferredCommand-maybeSetDeferredCommandTimer"><strong>maybeSetDeferredCommandTimer</strong></a>(self)</dt></dl> <dl><dt><a name="DeferredCommand-onTimer"><strong>onTimer</strong></a>(self, sender)</dt></dl> </td></tr></table>''', } self.class_doc = ClassDoc(classes, class_content) tp.add(self.class_doc, 'Classes') data = [r'''<strong>deferredCommands</strong> = []''',r'''<strong>timerIsActive</strong> = False'''] title = bigtitle('Data') contents = section(title, 'data', HTML('\n'.join(data))) tp.add(contents, 'Data') tp.addTabListener(self) tp.selectTab(0) # Call the window resized handler to get the initial sizes setup. Doing # this in a deferred command causes it to occur after all widgets' sizes # have been computed by the browser. DeferredCommand().add(self)