本文整理汇总了Python中org.sikuli.script.Region.onChange方法的典型用法代码示例。如果您正苦于以下问题:Python Region.onChange方法的具体用法?Python Region.onChange怎么用?Python Region.onChange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sikuli.script.Region
的用法示例。
在下文中一共展示了Region.onChange方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onChange
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import onChange [as 别名]
def onChange(self, arg1, arg2=None):
t_arg1 = __builtin__.type(arg1)
if t_arg1 is types.IntType:
min_size = arg1
handler = arg2
else:
min_size = None
handler = arg1
class AnonyObserver(SikuliEventAdapter):
def targetChanged(self, event):
handler(event)
if min_size != None:
return JRegion.onChange(self, min_size, AnonyObserver())
return JRegion.onChange(self, AnonyObserver())
示例2: onChange
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import onChange [as 别名]
def onChange(self, arg1, arg2=None):
if isinstance(arg1, int):
min_size = arg1
handler = arg2
else:
if (arg2 != None):
raise Exception("onChange: Invalid parameters set")
min_size = None
handler = arg1
class AnonyObserver(SikuliEventAdapter):
def targetChanged(self, event):
handler(event)
if min_size != None:
return JRegion.onChange(self, min_size, AnonyObserver())
return JRegion.onChange(self, AnonyObserver())
示例3: onChange
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import onChange [as 别名]
def onChange(self,arg1, arg2=None):
return SikuliRegion.onChange(self,arg1, arg2)