本文整理汇总了Python中pyjamas.ui.HorizontalPanel.HorizontalPanel.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python HorizontalPanel.__init__方法的具体用法?Python HorizontalPanel.__init__怎么用?Python HorizontalPanel.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.HorizontalPanel.HorizontalPanel
的用法示例。
在下文中一共展示了HorizontalPanel.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, SW, SH):
HorizontalPanel.__init__(self)
self.SW = SW
self.SH = SH
self.context = GWTCanvas(SW, SH, SW, SH)
self.context.addStyleName("gwt-canvas")
self.add(self.context)
示例2: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, labelname, contenthtml, labelnamesuffix=': ', ensure_labelnamesuffix=True):
HorizontalPanel.__init__(self)
if ensure_labelnamesuffix and not labelname.endswith(labelnamesuffix):
labelname += labelnamesuffix
self.add(Label(labelname, StyleName=Styles.CONTENTITEM_COMPONENT_LABEL))
self.add(HTML(contenthtml, StyleName=Styles.CONTENTITEM_COMPONENT_CONTENT))
return
示例3: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self)
History.newItem("test")
show = Button("Show deep link", self.showDL)
setDL = Button("Set deep link to 'pyjamas'", self.setDL)
self.add(setDL)
self.add(show)
示例4: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, token_index, target_word):
HorizontalPanel.__init__(self)
self.token_index = token_index
self.table = FlexTable()
self.label = Label(target_word)
self.textbox = TextBox()
self.add(self.label)
self.add(self.textbox)
示例5: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self, Spacing=4)
self.add(Label('Directly add in bulk:', StyleName='section'))
self.names = TextArea(VisibleLines=5)
self.add(self.names)
self.update = Button('Add', self)
self.add(self.update)
self.err = HTML()
self.add(self.err)
示例6: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, query, nUsers, tabName, topPanel):
HorizontalPanel.__init__(self)
self.button = Button('Compose tweet', self,
StyleName='compose-tweet-button')
self.add(self.button)
self.link = HTML()
self.add(self.link)
self.popup = TweetPopup(self.__class__.__name__,
query, nUsers, tabName, self, topPanel)
self.popup.setText('Compose a tweet')
示例7: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, chart, **kwargs):
self.chart = chart
HorizontalPanel.__init__(self, **kwargs)
self.bzoomIn = Button("<big>+</big>", self)
self.bzoomOut = Button("<big>-</big>", self)
self.bzoomIn.setTitle(
"Zoom in (expands selected region so it fills plot area)")
self.bzoomOut.setTitle(
"Zoom out (shrinks plot area so it fits in selected region)")
self.add(self.bzoomIn)
self.add(self.bzoomOut)
示例8: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self, Spacing=4)
self.add(Label('Cancel:', StyleName='section'))
self.name = TextBox()
self.name.setMaxLength(18)
self.name.setVisibleLength(18)
self.add(self.name)
self.cancel = Button('Do it', self)
self.add(self.cancel)
self.err = Label()
self.add(self.err)
示例9: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, chart):
self.chart = chart
HorizontalPanel.__init__(self)
# y-changing, x,y coordinate displaying, widget
self.incrementY = Button("Increment Y")
self.coordinates = HTML(""); # x,y of selected point
self.decrementY = Button("Decrement Y")
self.incrementY.addClickListener(self)
self.decrementY.addClickListener(self)
self.add(self.incrementY)
self.add(self.coordinates)
self.add(self.decrementY)
示例10: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self, Spacing=4)
self.add(Label('Dispatch:', StyleName='section'))
self.pause = Button('Pause', self)
self.add(self.pause)
self.resume = Button('Resume', self)
self.add(self.resume)
self.refresh = Button('Refresh', self, StyleName='refresh')
self.add(self.refresh)
self.err = Label()
self.add(self.err)
self._refresh()
示例11: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self)
#self.setSpacing('10px')
pool = StudentContainer(1, 20, 'pool_1')
for item in [['Fred', 12], ['Jane', 10], ['Sam', 18],
['Ginger', 8], ['Mary', 4]]:
pool.addStudent(name=item[0], age=item[1])
self.append(pool)
self.append(StudentContainer(6, 13, 'pool_2'))
self.append(StudentContainer(11, 20, 'pool_3'))
self.setSpacing('10px')
示例12: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self, Spacing=4)
self.add(Label('Queue size:', StyleName='section'))
self.underway = Label()
self.add(self.underway)
self.queued = Label()
self.add(self.queued)
self.button = Button('Refresh', self, StyleName='refresh')
self.add(self.button)
self.err = Label()
self.add(self.err)
self.update()
示例13: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__( self ):
HorizontalPanel.__init__( self )
self.setWidth( W_FRAME )
self.nameListBox = NameListBox()
self.nameTag = HTML( "<b>Choose User:</b>" )
self.numPointsListBox = NumPointsListBox()
self.npTag = HTML( "<b>Number of Points:</b>" )
self.statusHTML = HTML( "" )
self.add( self.nameTag )
self.add( self.nameListBox )
self.add( self.npTag )
self.add( self.numPointsListBox )
self.add( self.statusHTML )
示例14: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self):
HorizontalPanel.__init__(self, Spacing=4)
self.add(Label("Queued:", StyleName="section"))
s = ScrollPanel()
self.add(s)
v = VerticalPanel()
s.add(v)
self.queued = Grid(StyleName="users")
v.add(self.queued)
self.button = Button("Refresh", self, StyleName="refresh")
self.add(self.button)
self.err = Label()
self.add(self.err)
self.update()
示例15: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import __init__ [as 别名]
def __init__(self, handle, idx, checkOptions = [False, True]):
HorizontalPanel.__init__(self)
self.log = logging.getConsoleLogger(type(self).__name__, lev)
self.log.disabled = False
self.log.debug('__init__: Instantiation')
self.idx = idx
self._handle = handle
self._checkOptions = checkOptions
self.setStyleName('os-mech-checkbox-options')
#checkbox = CheckBox('symbol')
#checkbox.setChecked(checkOptions[0])
#checkbox.addClickListener(self.onClickOption)
#checkbox.setID('CBSY%d'%idx)
#self.append(checkbox)
#checkbox = CheckBox('value')
#checkbox.setChecked(checkOptions[1])
#checkbox.addClickListener(self.onClickOption)
#checkbox.setID('CBVA%d'%idx)
#self.append(checkbox)
self._textBoxRatio = TextBox('1:1')
self._ratioCache = self._textBoxRatio.getText()
self._textBoxRatio.setTitle('Ratio')
self._ratioCache = self._textBoxRatio.getText()
self._textBoxRatio.addChangeListener(self.onRatioChange)
self._textBoxRatio.setID('TXRT%d'%idx)
self._textBoxRatio.setStyleName('os-mech-textbox-ratio')
self._listBoxSize = ListBox()
self._listBoxSize.addChangeListener(self.onSizeSet)
self._listBoxSize.setVisibleItemCount(1)
self._listBoxSize.setStyleName('os-mech-listbox-size')
self._listBoxUnit = ListBox()
self._listBoxUnit.addChangeListener(self.onUnitSet)
self._listBoxUnit.setVisibleItemCount(1)
self._listBoxUnit.setStyleName('os-mech-listbox-unit')
self.append(Label('Ratio'))
self.append(self._textBoxRatio)
self.append(Label('Size'))
self.append(self._listBoxSize)
self.append(Label('Unit'))
self.append(self._listBoxUnit)