本文整理汇总了Python中pyjamas.ui.Label.Label.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Label.__init__方法的具体用法?Python Label.__init__怎么用?Python Label.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.Label.Label
的用法示例。
在下文中一共展示了Label.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, ctype, data):
Label.__init__(self)
AddablePanel.__init__(self)
self.setStyleName('content_text')
self.setText("'%s' content:" % ctype)
self.content = HTML(data, StyleName='content')
self.append(self.content)
示例2: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, text=None, forid=None, wordWrap=True, **kwargs):
if not kwargs.has_key('Element'):
element = DOM.createLabel()
if forid:
element.setAttribute("for", forid)
kwargs['Element'] = element
Label.__init__(self, text, wordWrap, **kwargs)
示例3: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, n, limit):
Label.__init__(self,
"Sorry, your query had too many (%s) results! The current "
"supported limit is %s." % (
utils.splitthousands(n),
utils.splitthousands(limit)),
StyleName='userlist-error-title')
示例4: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, countdown=1000):
Timer.__init__(self)
Label.__init__(self)
self.countdown = countdown
self.task_id = None
self.wait_cnt = 0
self.remote_py = \
EchoServicePython(server="flask", flask_view_type="celery")
示例5: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, text=None, listener=None, **kwargs):
if not kwargs.has_key("Element"):
element = DOM.createElement("a")
element.setAttribute("href", "javascript:void(0)")
kwargs["Element"] = element
if not kwargs.has_key("StyleName"):
kwargs["StyleName"] = "pseudolink"
Label.__init__(self, text, True, **kwargs)
if listener:
self.addClickListener(listener)
示例6: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, html=None, wordWrap=True, **kwargs):
kwargs['StyleName'] = kwargs.get('StyleName', "gwt-HTML")
if html:
kwargs['HTML'] = html
Label.__init__(self, wordWrap=wordWrap, **kwargs)
self.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS)
示例7: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, text=None, wordWrap=True, **kwargs):
kwargs['StyleName'] = kwargs.get('StyleName', "gwt-InlineLabel")
kwargs['Element'] = DOM.createSpan()
Label.__init__(self, text, wordWrap, **kwargs)
示例8: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, *args, **kwargs):
self.leds = []
Label.__init__(self, *args, **kwargs)
示例9: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import __init__ [as 别名]
def __init__(self, panel, char, x, y, width, height, **kwargs):
Label.__init__(self, text=char, Width=width, Height=height,
**kwargs)
self.panel = panel
self.panel.add(self, x, y)