本文整理汇总了Python中pyjamas.ui.VerticalPanel.VerticalPanel.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python VerticalPanel.__init__方法的具体用法?Python VerticalPanel.__init__怎么用?Python VerticalPanel.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.VerticalPanel.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self)
self.remoteproxy = JsonTaoggregatorService()
self.totalitemcount = 0
self.idToCallbackMap = {}
createToolbar = lambda: HorizontalToolbar(self.onRequestMore, self.onCollapseAll, self.onExpandAll)
topbar = createToolbar()
self.add(topbar)
self.contentpanel = ContentPanel(self.onCIPublish,
lambda sen, ci: self.onCIAdjustLike(sen, ci, 1),
lambda sen, ci: self.onCIAdjustLike(sen, ci, -1),
self.onSort,
self.onFilter)
self.add(self.contentpanel)
botbar = createToolbar()
self.add(botbar)
self.horiztoolbars = [topbar, botbar]
self.lastOnSortArgs = None
self.lastOnFilterArgs = None
self.requestDownloadedContentCount()
self.onRequestMore(None)
示例2: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self, hendler = None):
VerticalPanel.__init__(self,
#HorizontalAlignment=HasAlignment.ALIGN_CENTER,
#VerticalAlignment=HasAlignment.ALIGN_MIDDLE,
Width="100%",
#Height="100%",
Spacing=5)
self.remote = DataService(['getaccounts'])
self.grid = Grid(1, 3,
BorderWidth=1,
CellPadding=4,
CellSpacing=1,
StyleName="grid")
self.grid.setText(0, 0, u"Number")
self.grid.setText(0, 1, u"Type")
self.grid.setText(0, 2, u"Balance")
formatter = self.grid.getRowFormatter()
formatter.setStyleName(0, "grid-header")
self.add(Label(u"Accounts"))
self.add(self.grid)
示例3: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self, userListPanel, tabPanel, topPanel):
VerticalPanel.__init__(self, StyleName='large-avatar-panel')
self.userListPanel = userListPanel
self.tabPanel = tabPanel
self.topPanel = topPanel
upperPanel = HorizontalPanel(StyleName='large-avatar-upper-panel',
Spacing=8)
self.image = Image(StyleName='large-avatar')
self.upperText = HTML(StyleName='large-avatar-upper-text')
upperPanel.add(self.image)
upperPanel.add(self.upperText)
self.add(upperPanel)
self.lowerText = HTML(StyleName='large-avatar-lower-text')
self.add(self.lowerText)
self.followButton = None
self.user = None
insertPanel = HorizontalPanel(Spacing=3)
insertPanel.add(Label('Use name: '))
if tabPanel.tabName == 'simple':
b1 = Button('upper', SimpleInserter(self, 'upper'))
b2 = Button('lower', SimpleInserter(self, 'lower'))
insertPanel.add(b1)
insertPanel.add(b2)
else:
b1 = Button('or', QueryInserter(self, 'or'))
b2 = Button('and', QueryInserter(self, 'and'))
b3 = Button('except', QueryInserter(self, 'except'))
insertPanel.add(b1)
insertPanel.add(b2)
insertPanel.add(b3)
self.add(insertPanel)
示例4: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self,
HorizontalAlignment=HasAlignment.ALIGN_CENTER,
VerticalAlignment=HasAlignment.ALIGN_MIDDLE,
Width="100%",
Height="100%",
Spacing=5)
self.add(Label(JS('gettext("Hello, \%username\%!")')))
示例5: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__ (self, tags = None, width = 300, selected = None, myid = None):
VerticalPanel.__init__(self)
self.s2 = Select2TaggingComponent(tags, width, selected, myid)
self.reset_button = Button("Reset", self)
self.show_values_button = Button("Show", self)
self.add(self.s2)
self.add(self.reset_button)
self.add(self.show_values_button)
self.s2.change = self.change
示例6: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
""" Standard initialiser.
"""
VerticalPanel.__init__(self)
self.canvas = Raphael(900,700)
self.add(self.canvas)
x = DOM.getAbsoluteLeft(self.canvas.getElement())
y = DOM.getAbsoluteTop(self.canvas.getElement())
self.offset = (x,y)
示例7: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self, Width="500px", Height="300px")
table = FlexTable()
for i, sentence in enumerate(["The dog is red", "The cat is blue", "The bear is green"]):
table.setWidget(i, 0, CodeSwitchingSentence(sentence))
self.add(table)
示例8: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self)
self.setSpacing("10px")
field = TextArea()
field.setCharacterWidth(20)
field.setVisibleLines(4)
self.add(field)
self.add(AutoTextArea(self))
示例9: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self, names):
VerticalPanel.__init__(self, Spacing=8, StyleName='userlist-error-box')
self.add(Label(self.msg, StyleName='userlist-error-title'))
s = []
for name in names:
if self.link:
s.append(utils.screennameToTwitterLink(name))
else:
s.append(name)
self.add(HTML('<br/>'.join(s), StyleName='userlist-error-text'))
示例10: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self,
HorizontalAlignment=HasAlignment.ALIGN_LEFT,
StyleName='banner-panel')
self.add(Image('tickery.png', StyleName='banner-image'))
strapline = HTML(
'''Explore <a href="http://twitter.com">Twitter</a> with
<a href="http://fluidinfo.com/fluiddb">FluidDB</a>''',
StyleName='strapline')
self.add(strapline)
示例11: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self, topPanel, **kwargs):
VerticalPanel.__init__(self,
HorizontalAlignment=HasAlignment.ALIGN_LEFT,
StyleName='tickery-tab',
**kwargs)
self.topPanel = topPanel # don't add this yet!
self.topGrid = Grid(1, 2, StyleName='tickery-tab-top-grid',
HorizontalAlignment=HasAlignment.ALIGN_LEFT)
self.add(self.topGrid)
self.autoActivate = False
示例12: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self)
self.width = '100%'
self.setID('content')
self.add(TopVerbage())
self.add(NewSchool())
self.add(Delegated())
self.add(ImageDrop())
self.add(DataTransferDemo())
self.add(DragEffects())
self.add(AbsolutePosition())
self.add(MultiTargetDemo())
示例13: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self, tokens):
"""
Note that here tokens must be a list of lists
"""
VerticalPanel.__init__(self)
table = FlexTable()
self.bio_widgets = []
for i, token_list in enumerate(tokens):
self.bio_widgets.append(BIOhighlighter(i, token_list))
table.setWidget(i, 0, self.bio_widgets[i])
self.add(table)
示例14: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self):
VerticalPanel.__init__(self,Width="500px",Height="300px")
title = "<p><h3>Named Entity Annotator</h3></p>"
self.commit = Button("Submit",self)
self.current_block = NERBlock()
self.add(HTML(title))
self.add(self.current_block)
self.add(self.commit)
示例15: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import __init__ [as 别名]
def __init__(self, **kwargs):
VerticalPanel.__init__(self, **kwargs)
info = """<h2>JSON-RPC Example</h2>
#<p>This example demonstrates the calling of server services with
# <a href="http://json-rpc.org/">JSON-RPC</a>.
#</p>
#<p>Choose a service below, and press a the "call service" button to initiate it. An echo service simply sends the exact same text back that it receives.
# </p>"""
self.status=Label()
self.dockey = TextBox(Text="12")
self.TEXT_WAITING = "Waiting for response..."
self.METHOD_ECHO = "Echo"
self.METHOD_DOCTYPES = "get doc types"
self.METHOD_UPPERCASE = "get schema"
self.METHOD_GETINBOX = "get inbox"
self.METHOD_GETDOCS = "get documents"
self.methods = [self.METHOD_ECHO, self.METHOD_DOCTYPES,
self.METHOD_UPPERCASE, self.METHOD_GETINBOX,
self.METHOD_GETDOCS]
self.method_list = ListBox()
self.method_list.setName("hello")
self.method_list.setVisibleItemCount(1)
for method in self.methods:
self.method_list.addItem(method)
self.method_list.setSelectedIndex(0)
method_panel = HorizontalPanel()
method_panel.add(HTML("Remote string method to call: "))
method_panel.add(self.method_list)
method_panel.setSpacing(8)
self.button_action = Button("Call Service", self)
buttons = HorizontalPanel()
buttons.add(self.button_action)
buttons.setSpacing(8)
panel = VerticalPanel()
panel.add(HTML(info))
panel.add(HTML("Primary key of the patient in the database:"))
panel.add(self.dockey)
panel.add(method_panel)
panel.add(buttons)
panel.add(self.status)
self.add(panel)