本文整理汇总了Python中pyjamas.Window.addWindowResizeListener方法的典型用法代码示例。如果您正苦于以下问题:Python Window.addWindowResizeListener方法的具体用法?Python Window.addWindowResizeListener怎么用?Python Window.addWindowResizeListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.Window
的用法示例。
在下文中一共展示了Window.addWindowResizeListener方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createRightPanel
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def createRightPanel(self):
span = self.stabPanel = SimplePanel(Height="100%")
tabs = self.tabPanel = TabPanel(Width="100%", Border=1,Height="100%")
adgui = self.adinfoPanel = AdinfoIFACE(self)
tabs.add(adgui.panel, "AstroData Viewer")
calsgui = self.calsPanel = CalsIFACE(self)
tabs.add(calsgui.panel, "Calibrations")
rsgui = RecipeSystemIFACE.ReducePanelIFACE(self)
tabs.add(rsgui.panel, "Execute Reduce")
rogui = RecipeSystemIFACE.ReduceOutputIFACE(self)
tabs.add(rogui.panel, "Reduce Output")
Window.addWindowResizeListener(rogui)
tifs = self.tabIFACEs = [adgui, calsgui, rsgui, rogui]
self.tabIFACEdict = {"adgui": tifs.index(adgui),
"calsgui": tifs.index(calsgui),
"rsgui": tifs.index(rsgui),
"rogui": tifs.index(rogui)}
self.curTabIFACE = tifs[0]
tabs.selectTab(0)
span.add(tabs)
tabs.addTabListener(self, getattr(self, "onTabSelected"))
return span
示例2: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def onModuleLoad(self):
dock = DockPanel(Width="100%")
self.header = HTML(Width="100%", Height="220px")
self.footer = HTML(Width="100%")
self.sidebar = HTML(Width="200px", Height="100%", StyleName="sidebar")
self.fTabs = DecoratedTabPanel(Size=("100%", "100%"), StyleName="tabs")
#dp = DecoratorTitledPanel("Tabs", "bluetitle", "bluetitleicon",
# ["bluetop", "bluetop2", "bluemiddle", "bluebottom"])
#dp.add(self.fTabs)
dock.add(self.header, DockPanel.NORTH)
dock.add(self.footer, DockPanel.SOUTH)
dock.add(self.sidebar, DockPanel.EAST)
dock.add(self.fTabs, DockPanel.CENTER)
dock.setCellVerticalAlignment(self.fTabs, HasAlignment.ALIGN_TOP)
#dock.setCellHorizontalAlignment(self.fTabs, HasAlignment.ALIGN_CENTER)
dock.setCellWidth(self.header, "100%")
dock.setCellHeight(self.header, "220px")
dock.setCellWidth(self.footer, "100%")
dock.setCellWidth(self.sidebar, "200px")
RootPanel().add(dock)
self.dock = dock
self.loadPageList()
Window.addWindowResizeListener(self)
DeferredCommand.add(self)
示例3: __init__
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def __init__(self, parent=None):
Sink.__init__(self, parent)
self.frame = Frame("/summary", Size=("100%",rccutil.getHeight()))
self.initWidget(self.frame)
Window.addWindowResizeListener(self)
示例4: testResize
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def testResize(self):
# TODO: window resizing does not work accuratly in browser
# because getClientWidth etc does not really match GWT. We
# need to copy the GWT implementation
if IN_BROWSER:
return
self.resize_test = True
Window.addWindowResizeListener(self)
self.h = Window.getClientHeight()
self.w = Window.getClientWidth()
Window.resize(800, 600)
示例5: __init__
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def __init__(self, parent = None):
PanelIFACE.__init__(self, parent)
self.panel = ScrollPanel()
adinfo = HTML("", Size=("100%", parent.getHeight()))
self.panel.setSize("100%", parent.getHeight())
self.panel.add(adinfo)
self.adInfo = parent.adInfo = adinfo
Window.addWindowResizeListener(self)
return
示例6: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def onModuleLoad(self):
self.singleton = self
topPanel = TopPanel()
rightPanel = VerticalPanel()
self.mailDetail = MailDetail()
self.shortcuts = Shortcuts()
topPanel.setWidth("100%")
# MailList uses Mail.get() in its constructor, so initialize it after
# 'singleton'.
mailList = MailList(self.singleton)
mailList.setWidth("100%")
# Create the right panel, containing the email list & details.
rightPanel.add(mailList)
rightPanel.add(self.mailDetail)
mailList.setWidth("100%")
self.mailDetail.setWidth("100%")
# Create a dock panel that will contain the menu bar at the top,
# the shortcuts to the left, and the mail list & details taking the rest.
outer = DockPanel()
outer.add(topPanel, DockPanel.NORTH)
outer.add(self.shortcuts, DockPanel.WEST)
outer.add(rightPanel, DockPanel.CENTER)
outer.setWidth("100%")
outer.setSpacing(4)
outer.setCellWidth(rightPanel, "100%")
# Hook the window resize event, so that we can adjust the UI.
#FIXME need implementation # Window.addWindowResizeListener(this)
Window.addWindowResizeListener(self)
# Get rid of scrollbars, and clear out the window's built-in margin,
# because we want to take advantage of the entire client area.
Window.enableScrolling(False)
Window.setMargin("0px")
# Finally, add the outer panel to the RootPanel, so that it will be
# displayed.
#RootPanel.get().add(outer) # FIXME get#
RootPanel().add(outer)
RootPanel().add(Logger())
# 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)
示例7: __init__
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def __init__(self):
SimplePanel.__init__(self, StyleName='main-panel')
self.setWidth('100%')
self.tabs = tabs.Tabs()
self.tabs.addTabListener(self)
self.add(self.tabs)
Window.addWindowResizeListener(self)
DeferredCommand.add(self)
args = Window.getLocation().getSearchDict()
userlist.setSortKey(args.get('sort'))
userlist.setIconSize(args.get('icons'))
示例8: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def onModuleLoad(self):
self.remote = InfoServicePython()
self.tree_width = 200
self.tp = HorizontalPanel()
self.tp.setWidth("%dpx" % (self.tree_width))
self.treeview = Trees()
self.treeview.fTree.addTreeListener(self)
self.sp = ScrollPanel()
self.tp.add(self.treeview)
self.sp.add(self.tp)
self.sp.setHeight("100%")
self.horzpanel1 = HorizontalPanel()
self.horzpanel1.setSize("100%", "100%")
self.horzpanel1.setBorderWidth(1)
self.horzpanel1.setSpacing("10px")
self.rp = RightPanel()
self.rps = ScrollPanel()
self.rps.add(self.rp)
self.rps.setWidth("100%")
self.rp.setWidth("100%")
self.cp1 = CollapserPanel(self)
self.cp1.setWidget(self.sp)
self.cp1.setHTML(" ")
self.midpanel = MidPanel(self)
self.cp2 = CollapserPanel(self)
self.cp2.setWidget(self.midpanel)
self.cp2.setHTML(" ")
self.horzpanel1.add(self.cp1)
self.horzpanel1.add(self.cp2)
self.horzpanel1.add(self.rps)
self.cp1.setInitialWidth("%dpx" % self.tree_width)
self.cp2.setInitialWidth("200px")
RootPanel().add(self.horzpanel1)
width = Window.getClientWidth()
height = Window.getClientHeight()
self.onWindowResized(width, height)
Window.addWindowResizeListener(self)
示例9: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def onModuleLoad(self):
b = Button("Click me", greet)
hp = HorizontalPanel()
hp.setWidth("100%")
hp.setHeight("100%")
hp.setBorderWidth("1")
l = Label("hello world")
hp.add(l)
RootPanel().add(b)
RootPanel().add(hp)
#DOM.setCapture(l)
#DOM.setEventListener(l, self)
Window.addWindowResizeListener(self)
Timer(1000, self)
示例10: loadChapters
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def loadChapters(self):
self.curInfo = ''
self.curSink = None
self.description = HTML()
self.sink_list = SinkList()
self.panel = DockPanel()
self.loadSinks()
self.sinkContainer = DockPanel()
self.sinkContainer.setStyleName("ks-Sink")
#self.nf = NamedFrame("section")
#self.nf.setWidth("100%")
#self.nf.setHeight("10000")
height = Window.getClientHeight()
self.sp = ScrollPanel(self.sinkContainer)
#self.sp = VerticalSplitPanel()
self.sp.setWidth("100%")
self.sp.setHeight("%dpx" % (height-110))
#self.sp.setTopWidget(self.sinkContainer)
#self.sp.setBottomWidget(self.nf)
#self.sp.setSplitPosition(10000) # deliberately high - max out.
vp = VerticalPanel()
vp.setWidth("100%")
vp.setHeight("100%")
vp.add(self.description)
vp.add(self.sp)
self.description.setStyleName("ks-Intro")
self.panel.add(self.sink_list, DockPanel.WEST)
self.panel.add(vp, DockPanel.CENTER)
self.panel.setCellVerticalAlignment(self.sink_list,
HasAlignment.ALIGN_TOP)
self.panel.setCellWidth(vp, "100%")
self.panel.setCellHeight(vp, "100%")
Window.addWindowResizeListener(self)
History.addHistoryListener(self)
RootPanel().add(self.panel)
示例11: loadChapters
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
def loadChapters(self):
self.curInfo = ''
self.curSink = None
self.description = HTML()
self.sink_list = SinkList()
self.panel = DockPanel()
self.loadSinks()
self.sinkContainer = DockPanel()
self.sinkContainer.setStyleName("ks-Sink")
#self.nf = NamedFrame("section")
#self.nf.setWidth("100%")
#self.nf.setHeight("10000")
self.sp = ScrollPanel(self.sinkContainer)
#self.sp = VerticalSplitPanel()
self.sp.setWidth("100%")
self.sp.setHeight("100%")
#self.sp.setTopWidget(self.sinkContainer)
#self.sp.setBottomWidget(self.nf)
#self.sp.setSplitPosition(10000) # deliberately high - max out.
vp = VerticalPanel()
vp.setWidth("99%")
vp.setHeight("100%")
vp.add(self.description)
vp.add(self.sp)
authors = [
("2008, 2009", "Kenneth Casson Leighton", "[email protected]")
]
for years, name, email in authors:
authors_html = \
'© %s <a href="mailto:%s">%s</a><br />' %\
(years, email, name)
authors_panel = HTML()
authors_panel.setStyleName("ks-Authors")
authors_panel.setHTML(authors_html[:-6])
left_panel = DockPanel(Height="100%")
left_panel.add(self.sink_list, DockPanel.NORTH)
left_panel.add(authors_panel, DockPanel.SOUTH)
self.description.setStyleName("ks-Intro")
self.panel.add(left_panel, DockPanel.WEST)
self.panel.add(vp, DockPanel.CENTER)
self.panel.setCellVerticalAlignment(self.sink_list,
HasAlignment.ALIGN_TOP)
self.panel.setCellWidth(vp, "100%")
self.panel.setCellHeight(vp, "100%")
Window.addWindowResizeListener(self)
History.addHistoryListener(self)
RootPanel().add(self.panel)
self.onWindowResized(Window.getClientWidth(), Window.getClientHeight())
示例12: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
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')
#.........这里部分代码省略.........
示例13: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
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>
#.........这里部分代码省略.........
示例14: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
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>
#.........这里部分代码省略.........
示例15: onModuleLoad
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import addWindowResizeListener [as 别名]
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)