X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Futil%2FTableSorter.java;h=e2a0aca9f5290a1eef24642bd2266bdd8f76a33e;hb=a7169b1c72607f3c9357195b4999869650a2a891;hp=dcb5330602518d879f96b399d1939eb22ed49aca;hpb=865a855a4ca87eadb3e5ff284ed32ed307d9c34b;p=jalview.git
diff --git a/src/jalview/util/TableSorter.java b/src/jalview/util/TableSorter.java
index dcb5330..e2a0aca 100755
--- a/src/jalview/util/TableSorter.java
+++ b/src/jalview/util/TableSorter.java
@@ -1,31 +1,49 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.util;
-import java.util.*;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
-
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.table.*;
+import java.util.Map;
+
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JTable;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.JTableHeader;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumnModel;
+import javax.swing.table.TableModel;
/**
* TableSorter is a decorator for TableModels; adding sorting functionality to a
@@ -174,8 +192,8 @@ public class TableSorter extends AbstractTableModel
.getDefaultRenderer();
if (defaultRenderer instanceof SortableHeaderRenderer)
{
- this.tableHeader
- .setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
+ this.tableHeader.setDefaultRenderer(
+ ((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
}
}
this.tableHeader = tableHeader;
@@ -577,7 +595,8 @@ public class TableSorter extends AbstractTableModel
JLabel l = (JLabel) c;
l.setHorizontalTextPosition(JLabel.LEFT);
int modelColumn = table.convertColumnIndexToModel(column);
- l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
+ l.setIcon(
+ getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
}
return c;
}