本文整理汇总了Python中pyjamas.ui.HTML.HTML.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python HTML.__init__方法的具体用法?Python HTML.__init__怎么用?Python HTML.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.HTML.HTML
的用法示例。
在下文中一共展示了HTML.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self, hrs=0, mins=0, secs=0):
self.isActive = False
self.hrs = hrs
self.mins = mins
self.secs = secs
HTML.__init__(self)
self.setDisplay(self.hrs, self.mins, self.secs)
self.onTimer()
示例2: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self, tags = None, width = 300, selected = None, myid = 'select2example'):
#log.info("tags='%s' width='%s' selected='%s'", tags, width, selected)
self.myid = myid
self.tags = tags
# This markup is used by select2 to configure the component
html = '<p><input type="hidden" id="%s" style="width:%dpx"/></p>' % (myid, width)
html += '<div id="%s-show"></div>' % (myid)
self.selected = selected
log.info("html = '%s'", html)
HTML.__init__(self, html)
示例3: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self,text,styles,prev,constraints,enforce_constraints,update_widgets):
#Constraints are of the forms (x,y) where
#both x and y are integers in the set of possible
#states. x represents the state of this word
#and y represents the state of the previous word
HTML.__init__(self,text)
self.text = text
self.addClickListener(self)
self.state = 0
self.styles = styles
self.prev = prev
self.constraints = constraints
self.enforce_constraints = enforce_constraints
self.update_widgets = update_widgets
self.addStyleName("clickable")
示例4: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self, html=None, wordWrap=True, **kwargs):
kwargs['StyleName'] = kwargs.get('StyleName', "gwt-InlineHTML")
kwargs['Element'] = DOM.createSpan()
HTML.__init__(self, html, wordWrap, **kwargs)
示例5: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self, html=None, wordWrap=True, **kwargs):
HTML.__init__(self, html, wordWrap, **kwargs)
self.setHTML('Surfboards can be cool.')
示例6: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self, text):
HTML.__init__(self, text)
ClickHandler.__init__(self, preventDefault=True)
self.addClickListener(self)
示例7: __init__
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import __init__ [as 别名]
def __init__(self, html=None, wordWrap=True, Element=None, **kwargs):
self.converter = getShowdown()
HTML.__init__(self, html, wordWrap, Element, **kwargs)