int row, int column) {
if (column == 0) {
try {
// substance LNF has issues, if the checkbox and panel are cached, therefore recreate them during each rendering
JPanel checkBoxPanel = new JPanel(new FormLayout("0dlu:grow,default,0dlu:grow",
"fill:0dlu:grow,default,fill:0dlu:grow"));
boolean checked = ((Boolean) value).booleanValue();
JCheckBox checkBox = new JCheckBox("", checked);
checkBox.setOpaque(false);
checkBox.setContentAreaFilled(false);
checkBox.setHorizontalAlignment(SwingConstants.CENTER);
checkBox.setBorderPainted(true);
if (isSelected) {
checkBoxPanel.setForeground(table.getSelectionForeground());
checkBoxPanel.setBackground(table.getSelectionBackground());
} else {
checkBoxPanel.setForeground(table.getForeground());
checkBoxPanel.setBackground(table.getBackground());
}
checkBox.setSelected(checked);
checkBox.setEnabled(table.getModel().isCellEditable(row, column));
if (hasFocus) {
checkBox.setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
} else {
checkBox.setBorder(NO_FOCUS_BORDER);
}
checkBoxPanel.add(checkBox, mCC.xy(2, 2));
return checkBoxPanel;
} catch (Throwable t) {
t.printStackTrace();
}
}
JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (value instanceof PluginProxy || value instanceof InternalPluginProxyIf || value instanceof TvDataServiceProxy) {
Icon iconValue = null;
String nameValue = null;
String descValue = null;
boolean isActivated = true;
if (value instanceof PluginProxy) {
PluginProxy plugin = (PluginProxy) value;
iconValue = plugin.getPluginIcon();
if (iconValue != null) {
iconValue = new FixedSizeIcon(16, 16, iconValue);
}
descValue = plugin.getInfo().getDescription().replace('\n', ' ');
isActivated = plugin.isActivated();
nameValue = plugin.getInfo().getName() + " " + plugin.getInfo().getVersion();
} else if (value instanceof InternalPluginProxyIf) {
InternalPluginProxyIf plugin = (InternalPluginProxyIf) value;
nameValue = plugin.getName();
descValue = plugin.getButtonActionDescription().replace('\n', ' ');
iconValue = plugin.getIcon();
} else if (value instanceof TvDataServiceProxy) {
TvDataServiceProxy service = (TvDataServiceProxy) value;
nameValue = service.getInfo().getName() + " " + service.getInfo().getVersion();
descValue = HTMLTextHelper.convertHtmlToText(service.getInfo().getDescription()).replace('\n', ' ');
}
if (iconValue == null) {
iconValue = DEFAULT_ICON;
}
if (mPanel == null) {
mIcon = new JLabel();
mName = new JLabel();
mName.setFont(table.getFont().deriveFont(Font.BOLD, table.getFont().getSize2D() + 2));
mPanel = new JPanel(new FormLayout("default, 2dlu, fill:0dlu:grow", "default, 2dlu, default"));
mPanel.setBorder(Borders.DLU2_BORDER);
mPanel.add(mIcon, mCC.xy(1, 1));
mPanel.add(mName, mCC.xy(3, 1));
}