public void setTableEditor(JTable table) { this.table = table; TableColumnModel columnModel = table.getColumnModel(); columnModel.getColumn(COL_CHECK).setCellRenderer(new BooleanTableCellRenderer()); columnModel.getColumn(COL_CHECK).setCellEditor(new BooleanTableCellEditor()); columnModel.getColumn(COL_CHECK).setPreferredWidth(50); columnModel.getColumn(COL_TABLE).setPreferredWidth(100); JTableHeader header = table.getTableHeader(); header.setDefaultRenderer(new ClassTableHeaderRenderer(table, true)); }
CloudLibraryTable(List<CloudLibrary> libraries) { super(new CloudLibraryTableModel(libraries)); setSelectionMode(ListSelectionModel.SINGLE_SELECTION); setDefaultRenderer(CloudLibrary.class, new CloudLibraryRenderer()); setDefaultRenderer(Boolean.class, new BooleanTableCellRenderer()); setDefaultEditor(Boolean.class, new BooleanTableCellEditor()); TableUtil.setupCheckboxColumn(getColumnModel().getColumn(1)); }
@Override public TableCellEditor getEditor(final IdeaPluginDescriptor o) { return new BooleanTableCellEditor(); }
public TableCellEditor getEditor(final IdeaPluginDescriptor o) { return new BooleanTableCellEditor(); }