Search in sources :

Example 1 with GroupableTableHeaderUI

use of com.alibaba.druid.support.jconsole.model.GroupableTableHeaderUI in project druid by alibaba.

the class DruidSQLPanel method addTableGroup.

private void addTableGroup() {
    TableColumnModel cm = table.getColumnModel();
    // System.out.println(SHOW_LIST.size());
    for (int i : listHistogram) {
        groupHistogram.add(cm.getColumn(i));
    }
    for (int j : listEffectedRowCountHistogram) {
        groupEffectedRowCountHistogram.add(cm.getColumn(j));
    }
    for (int x : listExecuteAndResultHoldTimeHistogram) {
        groupExecuteAndResultHoldTimeHistogram.add(cm.getColumn(x));
    }
    for (int y : listFetchRowCountHistogram) {
        groupFetchRowCountHistogram.add(cm.getColumn(y));
    }
    GroupableTableHeader header = (GroupableTableHeader) table.getTableHeader();
    header.addColumnGroup(groupHistogram);
    header.addColumnGroup(groupEffectedRowCountHistogram);
    header.addColumnGroup(groupExecuteAndResultHoldTimeHistogram);
    header.addColumnGroup(groupFetchRowCountHistogram);
    header.setUI(new GroupableTableHeaderUI());
}
Also used : TableColumnModel(javax.swing.table.TableColumnModel) GroupableTableHeaderUI(com.alibaba.druid.support.jconsole.model.GroupableTableHeaderUI) GroupableTableHeader(com.alibaba.druid.support.jconsole.model.GroupableTableHeader)

Aggregations

GroupableTableHeader (com.alibaba.druid.support.jconsole.model.GroupableTableHeader)1 GroupableTableHeaderUI (com.alibaba.druid.support.jconsole.model.GroupableTableHeaderUI)1 TableColumnModel (javax.swing.table.TableColumnModel)1