本文整理匯總了Python中panel.Panel.appendPanelElement方法的典型用法代碼示例。如果您正苦於以下問題:Python Panel.appendPanelElement方法的具體用法?Python Panel.appendPanelElement怎麽用?Python Panel.appendPanelElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類panel.Panel
的用法示例。
在下文中一共展示了Panel.appendPanelElement方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: createPanelFromXML
# 需要導入模塊: from panel import Panel [as 別名]
# 或者: from panel.Panel import appendPanelElement [as 別名]
def createPanelFromXML(panelNode, sourceApp=None):
panel = Panel(None)
if len(panelNode) is 0:
logger.warn('Dashboard panel is empty (line %d)', panelNode.sourceline)
for panelElementNode in panelNode:
if panelElementNode.tag == 'input':
inputInstance = forminput.createInput(
panelElementNode.get('type'), dict(searchWhenChanged=True))
inputInstance.fromXml(panelElementNode, sourceApp)
panel.fieldset.append(inputInstance)
else:
panelElement = createPanelElementFromXml(panelElementNode)
if panelElement:
panel.appendPanelElement(panelElement)
return panel
示例2: appendPanelElement
# 需要導入模塊: from panel import Panel [as 別名]
# 或者: from panel.Panel import appendPanelElement [as 別名]
def appendPanelElement(self, panelElement):
'''
Append an element to the first panel that has room
if there is no free spot create a panel and put the element inside
'''
for panel in self.panels:
if panel.appendPanelElement(panelElement):
break
else:
panel = Panel(1)
self.panels.append(panel)
return panel.appendPanelElement(panelElement)
return True