I played around with this a little bit more, and I found something interesting that is possibly of note. I developed this code to make the power table completely transparent believing that if I blew all of the background colors out, then perhaps I could build them back in in a way that didn’t effect the JCheckboxes. So far, I found that the Boolean column behaves differently than the other classes:
def configureCell(self, value, textValue, selected, rowIndex, colIndex, colName, rowView, colView):
import java.awt.BorderLayout
layout = self.layout.getViewport()
layout.setOpaque(0)
self.table.setOpaque(0)
self.table.getDefaultRenderer(self.table.getColumnClass(colIndex)).setOpaque(0)
self.background = java.awt.Color(255, 255, 255 ,0)
customizations = {}
customizations = {'background': java.awt.Color(0, 0, 0 ,0)}
return customizations
The preceding code produces this result:
Now, when I restore the original customizations, all of the other columns respond in the expected way, but the boolean column remains transparent while only the JCheckboxes inherit the color:
if rowView % 2 != 0:
customizations = {'background': java.awt.Color(150, 150, 150 ,255)}
else:
customizations = {'background':java.awt.Color(0, 0, 0, 255)}
Filtering the customizers using column class allows me to get all of the checkboxes white (what we want), but we are still back to the original problem of not being able to customize the Boolean column row by row
if self.table.getColumnClass(colIndex) != java.lang.Boolean:
if rowView % 2 != 0:
customizations = {'background': java.awt.Color(150, 150, 150 ,255)}
else:
customizations = {'background':java.awt.Color(0, 0, 0, 255)}
else:
customizations = {'background': java.awt.Color(255, 255, 255 ,255)}
return customizations
Anybody have an idea? One idea I’m toying with is simply positioning an empty power table under this one. Since the column is transparent, the grey and black cells from other table’s empty column would effectively produce the effect I’m looking for if I could bind the number of rows and the scroll functions of the two tables together.
Edit: added missing self.background = java.awt.Color(255, 255, 255 ,0)
to the script. This is required for transparency to occur. I had originally done this manually from the property editor, so I had accidently left it unscripted