@@ -0,0 +1,2185 @@
+package net.sf.jabref.gui.maintable;%0A%0Aimport net.sf.jabref.gui.BibtexFields;%0Aimport net.sf.jabref.model.entry.EntryUtil;%0A%0Aimport java.util.Optional;%0A%0Apublic class MainTableColumn %7B%0A%0A    private String columnName;%0A%0A    private Optional%3CString%5B%5D%3E bibtexFields;%0A%0A    public MainTableColumn(String columnName) %7B%0A        this.columnName = columnName;%0A        this.bibtexFields = Optional.empty();%0A    %7D%0A%0A    public MainTableColumn(String columnName, String%5B%5D bibtexFields) %7B%0A        this.columnName = columnName;%0A        this.bibtexFields = Optional.of(bibtexFields);%0A    %7D%0A%0A    /**%0A     * Get the table column name to be displayed in the UI%0A     *%0A     * TODO: use JLabel to be able to display Iconcols?%0A     *%0A     * @return%0A     */%0A    public String getDisplayName() %7B%0A        if(bibtexFields.isPresent()) %7B%0A            String%5B%5D fields = bibtexFields.get();%0A            StringBuilder builder = new StringBuilder();%0A            for (int i = 0; i %3C fields.length; i++) %7B%0A                if (i %3E 0) %7B%0A                    builder.append(MainTableFormat.COL_DEFINITION_FIELD_SEPARATOR);%0A                %7D%0A                String fieldDisplayName = BibtexFields.getFieldDisplayName(fields%5Bi%5D);%0A                if (fieldDisplayName != null) %7B%0A                    builder.append(fieldDisplayName);%0A                %7D else %7B%0A                    builder.append(EntryUtil.capitalizeFirst(fields%5Bi%5D));%0A                %7D%0A            %7D%0A            return builder.toString();%0A        %7D else %7B%0A            return columnName;%0A        %7D%0A    %7D%0A%0A    /**%0A     * Checks whether the column should display names%0A     * Relevant as name value format can be formatted.%0A     *%0A     * @return true if the bibtex fields contains author or editor%0A     */%0A    public boolean isNameColumn() %7B%0A        if(bibtexFields.isPresent()) %7B%0A            for(String field : bibtexFields.get()) %7B%0A                if(%22author%22.equals(field) %7C%7C %22editor%22.equals(field)) %7B%0A                    return true;%0A                %7D%0A            %7D%0A        %7D%0A%0A        return false;%0A    %7D%0A%0A    public String getColumnName() %7B%0A        return columnName;%0A    %7D%0A%0A    public Optional%3CString%5B%5D%3E getBibtexFields() %7B%0A        return bibtexFields;%0A    %7D%0A%0A%0A%0A%7D%0A

add class for tableColumns in MainTable