private static void setupTable(JTable table, Project project) {
   new TableSpeedSearch(table);
   table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
   table.addMouseListener(new MetricTableMouseListener(project, table));
   final JTableHeader tableHeader = table.getTableHeader();
   tableHeader.addMouseListener(new MetricTableHeaderMouseListener(project, table));
 }
 public TaskTableSorter(TaskTable table) {
   JTableHeader tableHeader = table.getTableHeader();
   tableHeader.addMouseListener(new MouseHandler());
   tableHeader.setDefaultRenderer(new SortableHeaderRenderer());
 }
 public void allowSortColChange(boolean allow) {
   JTableHeader hdr = table.getTableHeader();
   if (allow && !allowSortColChange) hdr.addMouseListener(allowSortColChangeMouseListener);
   else if (!allow && allowSortColChange) hdr.removeMouseListener(allowSortColChangeMouseListener);
   allowSortColChange = allow;
 }