Search in sources :

Example 1 with ColumnHeaderRankOptionRenderer

use of org.baderlab.csplugins.enrichmentmap.view.heatmap.table.ColumnHeaderRankOptionRenderer in project EnrichmentMapApp by BaderLab.

the class HeatMapMainPanel method clearTableHeader.

private void clearTableHeader() {
    JTableHeader header = table.getTableHeader();
    TableColumnModel columnModel = table.getColumnModel();
    if (columnModel.getColumnCount() > 0) {
        TableColumn rankColumn = columnModel.getColumn(HeatMapTableModel.RANK_COL);
        TableCellRenderer existingRenderer = rankColumn.getHeaderRenderer();
        if (existingRenderer instanceof ColumnHeaderRankOptionRenderer) {
            ((ColumnHeaderRankOptionRenderer) existingRenderer).dispose(header);
        }
    }
}
Also used : TableCellRenderer(javax.swing.table.TableCellRenderer) ColumnHeaderRankOptionRenderer(org.baderlab.csplugins.enrichmentmap.view.heatmap.table.ColumnHeaderRankOptionRenderer) JTableHeader(javax.swing.table.JTableHeader) TableColumnModel(javax.swing.table.TableColumnModel) TableColumn(javax.swing.table.TableColumn)

Aggregations

JTableHeader (javax.swing.table.JTableHeader)1 TableCellRenderer (javax.swing.table.TableCellRenderer)1 TableColumn (javax.swing.table.TableColumn)1 TableColumnModel (javax.swing.table.TableColumnModel)1 ColumnHeaderRankOptionRenderer (org.baderlab.csplugins.enrichmentmap.view.heatmap.table.ColumnHeaderRankOptionRenderer)1