当前位置: 首页>>代码示例>>Python>>正文


Python HorizontalPanel.__init__方法代码示例

本文整理汇总了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)
开发者ID:ThatSnail,项目名称:OthelloBot,代码行数:9,代码来源:widget.py

示例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
开发者ID:satyam07,项目名称:taoggregator,代码行数:9,代码来源:feedpublisherwebui.py

示例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)
开发者ID:Afey,项目名称:pyjs,代码行数:10,代码来源:deepLink.py

示例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)
开发者ID:lukeorland,项目名称:Choban,代码行数:10,代码来源:BIO.py

示例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)
开发者ID:jdunck,项目名称:Tickery,代码行数:11,代码来源:directadd.py

示例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')
开发者ID:jdunck,项目名称:Tickery,代码行数:12,代码来源:tweet.py

示例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)
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:13,代码来源:GChartExample24.py

示例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)
开发者ID:fluidinfo,项目名称:Tickery,代码行数:13,代码来源:cancel.py

示例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)
开发者ID:Afey,项目名称:pyjs,代码行数:14,代码来源:GChartExample21.py

示例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()
开发者ID:jdunck,项目名称:Tickery,代码行数:14,代码来源:pause.py

示例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')
开发者ID:anandology,项目名称:pyjamas,代码行数:14,代码来源:DNDTest.py

示例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()
开发者ID:jdunck,项目名称:Tickery,代码行数:14,代码来源:size.py

示例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 )
开发者ID:jackdreilly,项目名称:iShakeBackend,代码行数:15,代码来源:EventSimple.py

示例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()
开发者ID:jdunck,项目名称:Tickery,代码行数:16,代码来源:queued.py

示例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)
开发者ID:OneSolver,项目名称:onesolver,代码行数:47,代码来源:Drawing.py


注:本文中的pyjamas.ui.HorizontalPanel.HorizontalPanel.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。