本文整理汇总了Python中opengeo.gui.exploreritems.TreeItem._getDescriptionHtml方法的典型用法代码示例。如果您正苦于以下问题:Python TreeItem._getDescriptionHtml方法的具体用法?Python TreeItem._getDescriptionHtml怎么用?Python TreeItem._getDescriptionHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类opengeo.gui.exploreritems.TreeItem
的用法示例。
在下文中一共展示了TreeItem._getDescriptionHtml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getDescriptionHtml
# 需要导入模块: from opengeo.gui.exploreritems import TreeItem [as 别名]
# 或者: from opengeo.gui.exploreritems.TreeItem import _getDescriptionHtml [as 别名]
def _getDescriptionHtml(self, tree, explorer):
if not self.element.isValid:
html = ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.'
'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>')
return html
else:
return TreeItem._getDescriptionHtml(self, tree, explorer)
示例2: _getDescriptionHtml
# 需要导入模块: from opengeo.gui.exploreritems import TreeItem [as 别名]
# 或者: from opengeo.gui.exploreritems.TreeItem import _getDescriptionHtml [as 别名]
def _getDescriptionHtml(self, tree, explorer):
if not self.element.isValid:
html = u'<div style="background-color:#ffffcc;"><h1> ' + self.text(0) + ' (GWC layer)</h1></div></br>'
html += ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.'
'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>')
return html
else:
return TreeItem._getDescriptionHtml(self, tree, explorer)
示例3: _getDescriptionHtml
# 需要导入模块: from opengeo.gui.exploreritems import TreeItem [as 别名]
# 或者: from opengeo.gui.exploreritems.TreeItem import _getDescriptionHtml [as 别名]
def _getDescriptionHtml(self, tree, explorer):
if not self.element.isValid:
html = ""
typesok, typesmsg = self._checkAllSelectionTypes(self, tree)
if not typesok:
return typesmsg
else:
html += typesmsg
items = tree.selectedItems()
# don't show if multiple items selected, but not the current item
if not items or self in items or len(items) == 1:
html += ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.'
'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>')
return html
else:
return TreeItem._getDescriptionHtml(self, tree, explorer)