@@ -61,6 +61,10 @@ public class ListPanel extends JPanel
6161
6262 static Font plainFont ;
6363 static Font boldFont ;
64+ static Font headerFont ;
65+
66+ // Should this be in theme.txt? Of course! Is it? No.
67+ static final Color HEADER_BGCOLOR = new Color (0xffEBEBEB );
6468
6569
6670 public ListPanel () {
@@ -72,12 +76,13 @@ public ListPanel() {
7276
7377 plainFont = Toolkit .getSansFont (14 , Font .PLAIN );
7478 boldFont = Toolkit .getSansFont (14 , Font .BOLD );
79+ headerFont = Toolkit .getSansFont (12 , Font .PLAIN );
7580 }
7681 }
7782
7883
7984 public ListPanel (final ContributionTab contributionTab ,
80- Contribution .Filter filter ) {
85+ Contribution .Filter filter ) {
8186 this .contributionTab = contributionTab ;
8287 this .filter = filter ;
8388
@@ -89,17 +94,16 @@ public ListPanel(final ContributionTab contributionTab,
8994 new TreeMap <Contribution , DetailPanel >(ContributionListing .COMPARATOR );
9095
9196 model = new ContribTableModel ();
92- table = new JTable (model ){
97+ table = new JTable (model ) {
9398 @ Override
94- public Component prepareRenderer (
95- TableCellRenderer renderer , int row , int column ) {
96- Component c = super .prepareRenderer (renderer , row , column );
97- if (isRowSelected (row )) {
98- c .setBackground (new Color (0xe0fffd ));
99- } else {
100- c .setBackground (Color .white );
101- }
102- return c ;
99+ public Component prepareRenderer (TableCellRenderer renderer , int row , int column ) {
100+ Component c = super .prepareRenderer (renderer , row , column );
101+ if (isRowSelected (row )) {
102+ c .setBackground (new Color (0xe0fffd ));
103+ } else {
104+ c .setBackground (Color .white );
105+ }
106+ return c ;
103107 }
104108 };
105109
@@ -223,16 +227,19 @@ public Component getTableCellRendererComponent(JTable table, Object value,
223227 boolean isSelected , boolean hasFocus , int row , int column ) {
224228 super .getTableCellRendererComponent (table , value ,
225229 isSelected , hasFocus , row , column );
230+
226231 JTableHeader tableHeader = table .getTableHeader ();
227232 if (tableHeader != null ) {
228233 setForeground (tableHeader .getForeground ());
229234 }
230- setIcon (getIcon (table , column ));
231- if (column % 2 == 0 ) {
232- setBackground (new Color (0xdfdfdf ));
233- } else {
234- setBackground (new Color (0xebebeb ));
235- }
235+ setFont (headerFont );
236+ setIcon (getSortIcon (table , column ));
237+ setBackground (HEADER_BGCOLOR );
238+ // if (column % 2 == 0) {
239+ // setBackground(new Color(0xdfdfdf));
240+ // } else {
241+ // setBackground(new Color(0xebebeb));
242+ // }
236243 setBorder (null );
237244 return this ;
238245 }
@@ -245,7 +252,7 @@ public Component getTableCellRendererComponent(JTable table, Object value,
245252 * @param column the column index.
246253 * @return the sort icon, or null if the column is unsorted.
247254 */
248- protected Icon getIcon (JTable table , int column ) {
255+ protected Icon getSortIcon (JTable table , int column ) {
249256 SortKey sortKey = getSortKey (table , column );
250257 if (sortKey != null && table .convertColumnIndexToView (sortKey .getColumn ()) == column ) {
251258 switch (sortKey .getSortOrder ()) {
0 commit comments