本文整理汇总了Python中javax.swing.JLabel.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Python JLabel.setVisible方法的具体用法?Python JLabel.setVisible怎么用?Python JLabel.setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JLabel
的用法示例。
在下文中一共展示了JLabel.setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: QatDialog
# 需要导入模块: from javax.swing import JLabel [as 别名]
# 或者: from javax.swing.JLabel import setVisible [as 别名]
#.........这里部分代码省略.........
self.toolsComboModel.addElement(tool)
#views combobox model
tool.viewsComboModel = DefaultComboBoxModel()
for view in tool.views:
tool.viewsComboModel.addElement(view.title)
#checks table, one TableModel for each view, of each tool
columns = ["",
self.app.strings.getString("Check"),
self.app.strings.getString("Errors")]
for view in tool.views:
tableRows = []
for check in view.checks:
if check.icon is not None:
icon = check.icon
else:
icon = ""
errorsNumber = ""
tableRows.append([icon, check.title, errorsNumber])
view.tableModel = MyTableModel(tableRows, columns)
def update_favourite_zone_indicator(self):
#icon
if self.app.favZone is not None:
self.favAreaIndicator.setIcon(self.app.favZone.icon)
#tooltip
messageArguments = array([self.app.favZone.name], String)
formatter = MessageFormat("")
formatter.applyPattern(self.app.strings.getString("favAreaIndicator_tooltip"))
msg = formatter.format(messageArguments)
self.favAreaIndicator.setToolTipText(msg)
#status
self.favAreaIndicator.setVisible(self.app.favouriteZoneStatus)
def set_checksTextFld_color(self, color):
"""Change color of textField under checksTable
"""
colors = {"white": (255, 255, 255),
"black": (0, 0, 0),
"green": (100, 200, 0),
"red": (200, 0, 0)}
if color == "default":
self.statsPanel.background = self.statsPanel_def_color
self.checksTextFld.foreground = colors["black"]
else:
self.statsPanel.background = colors[color]
self.checksTextFld.foreground = colors["white"]
def change_selection(self, source):
"""Change comboboxes and checks table selections after a
selection has been made by the user
"""
if source in ("menu", "layer", "add favourite"):
self.app.selectionChangedFromMenuOrLayer = True
self.toolsCombo.setSelectedItem(self.app.selectedTool)
self.viewsCombo.setModel(self.app.selectedTool.viewsComboModel)
self.viewsCombo.setSelectedItem(self.app.selectedView.title)
self.checksTable.setModel(self.app.selectedTableModel)
self.refresh_checksTable_columns_geometries()
for i, c in enumerate(self.app.selectedView.checks):
if c == self.app.selectedChecks[0]:
break
self.checksTable.setRowSelectionInterval(i, i)
self.app.selectionChangedFromMenuOrLayer = False