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


Python JTable.prepareRenderer方法代码示例

本文整理汇总了Python中javax.swing.JTable.prepareRenderer方法的典型用法代码示例。如果您正苦于以下问题:Python JTable.prepareRenderer方法的具体用法?Python JTable.prepareRenderer怎么用?Python JTable.prepareRenderer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JTable的用法示例。


在下文中一共展示了JTable.prepareRenderer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: prepareRenderer

# 需要导入模块: from javax.swing import JTable [as 别名]
# 或者: from javax.swing.JTable import prepareRenderer [as 别名]
 def prepareRenderer(self, renderer, row, column):
     c = JTable.prepareRenderer(self,renderer, row, column)
     impressionColor = {self._extender._enfocementStatuses[0]:Color.RED,
                         self._extender._enfocementStatuses[1]:Color.YELLOW,
                         self._extender._enfocementStatuses[2]:Color.GREEN}
     for impression in impressionColor:
         if self._extender.getValueAt(row,1) == impression:
             c.setBackground(impressionColor[impression]);
     
     return c
开发者ID:MiauWuffMiau,项目名称:Autorize,代码行数:12,代码来源:Autorize.py

示例2: prepareRenderer

# 需要导入模块: from javax.swing import JTable [as 别名]
# 或者: from javax.swing.JTable import prepareRenderer [as 别名]
 def prepareRenderer(self, renderer, row, column):
     c = JTable.prepareRenderer(self,renderer, row, column)
     selectedRow = self._extender.logTable.getSelectedRow()
     if row == selectedRow:
         return c
     if self._extender.getValueAt(row,4) == "Green":
         c.setBackground(Color.GREEN)
     elif self._extender.getValueAt(row,4) == "Red":
         c.setBackground(Color.RED)
     else:
         c.setBackground(None)
     
     return c
开发者ID:anhnt4288,项目名称:PT-Manager,代码行数:15,代码来源:PTManager.py

示例3: prepareRenderer

# 需要导入模块: from javax.swing import JTable [as 别名]
# 或者: from javax.swing.JTable import prepareRenderer [as 别名]
    def prepareRenderer(self, renderer, row, col):
        comp = JTable.prepareRenderer(self,renderer, row, col)
        value = self._extender.getValueAt(row,col)
        
        if (value == "Authorization bypass!" and ((col == 5) or (col == 6))):
            comp.setBackground(Color(255,135,31))
        elif (value == "Authorization enforced??? (please configure enforcement detector)" and ((col == 5) or (col == 6))):
            comp.setBackground(Color(255,255,133));
        elif (value == "Authorization enforced!" and ((col == 5) or (col == 6))):
            comp.setBackground(Color(192,250,20));
        else:
            comp.setBackground(Color.white);

        return comp
开发者ID:federicodotta,项目名称:Autorize,代码行数:16,代码来源:Autorize.py


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