本文整理汇总了Python中pyjamas.Window.removeWindowResizeListener方法的典型用法代码示例。如果您正苦于以下问题:Python Window.removeWindowResizeListener方法的具体用法?Python Window.removeWindowResizeListener怎么用?Python Window.removeWindowResizeListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.Window
的用法示例。
在下文中一共展示了Window.removeWindowResizeListener方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onWindowResized
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import removeWindowResizeListener [as 别名]
def onWindowResized(self, width, height):
if not self.resize_test:
self.fail("onWindowResized called after WindowListener removed")
return
nh = Window.getClientHeight()
nw = Window.getClientWidth()
# TODO: we cannot assert the exact size, because, we have toolbars
self.assertTrue(nw!=self.w)
self.assertTrue(nh!=self.h)
self.assertTrue(isinstance(nw, int))
self.assertTrue(isinstance(nh, int))
# put the window back to its original size
# but make sure to switch off resize notify!
self.resize_test = False
Window.removeWindowResizeListener(self)
Window.resize(self.w, self.h)
示例2: hideGlass
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import removeWindowResizeListener [as 别名]
def hideGlass(self):
Window.removeWindowResizeListener(self)
doc().body.removeChild(self.glass)
Window.enableScrolling(True)
示例3: hideGlass
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import removeWindowResizeListener [as 别名]
def hideGlass(self):
Window.removeWindowResizeListener(self)
doc().body.removeChild(self.getElement())