avatar

593

An attempt at a fix for the vista wacky column header issue. Irrelevant as it's fixed in later Java releases. Putting it into the source history so I can pull it out later, if needed.

by mrs, 07 Aug, 2008 05:12 PM
358 593  
4343     return JConfig.getOS().equalsIgnoreCase("windows");
4444   }
4545 
46   /** 
46   public static boolean isVista() {
47     return System.getProperty("os.name").startsWith("Windows Vista");
48   }
49 
50   /**
4751    * @brief Set up the Mac UI information, based on the configuration.
4852    */
4953   public static void setupMacUI() {
578 593  
3838  */
3939 
4040 import com.jbidwatcher.util.config.JConfig;
41 import com.jbidwatcher.platform.Platform;
42 
4143 import java.util.*;
4244 import javax.swing.event.TableModelEvent;
4345 import javax.swing.event.TableModelListener;
------
5052 import java.awt.*;
5153 import javax.swing.table.*;
5254 import javax.swing.*;
55 import javax.swing.border.Border;
5356 
5457 public class TableSorter extends Transformation implements TableModelListener {
5558   private JTable _table = null;
------
237240   }
238241 
239242   private static class SortHeaderRenderer extends JLabel implements TableCellRenderer {
243     private final Border emptyBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);
244 
240245     public SortHeaderRenderer() {
241246       setHorizontalTextPosition(LEFT);
242247       setHorizontalAlignment(CENTER);
------
255260       }
256261 
257262       setText((value == null) ? "" : value.toString());
258       setBorder(UIManager.getBorder("TableHeader.cellBorder"));
263       if(false && Platform.isVista()) {
264         setBorder(emptyBorder);
265       } else {
266         setBorder(UIManager.getBorder("TableHeader.cellBorder"));
267       }
259268 
260269       return this;
261270     }