public void installUI(JComponent c) {
    super.installUI(c);

    if (XPStyle.getXP() != null) {
      originalHeaderRenderer = header.getDefaultRenderer();
      if (originalHeaderRenderer instanceof UIResource) {
        header.setDefaultRenderer(new XPDefaultRenderer());
      }
    }
  }
 /** Updates the UIs of all the known Frames. */
 private static void updateAllUIs() {
   // Check if the current UI is WindowsLookAndfeel and flush the XP style map.
   // Note: Change the package test if this class is moved to a different package.
   Class uiClass = UIManager.getLookAndFeel().getClass();
   if (uiClass.getPackage().equals(DesktopProperty.class.getPackage())) {
     XPStyle.invalidateStyle();
   }
   Frame appFrames[] = Frame.getFrames();
   for (int j = 0; j < appFrames.length; j++) {
     updateWindowUI(appFrames[j]);
   }
 }
    public Component getTableCellRendererComponent(
        JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
      if (table != null) {
        JTableHeader header = table.getTableHeader();
        if (header != null) {
          setFont(header.getFont());
        }
      }
      this.isSelected = isSelected;
      this.hasFocus = hasFocus;
      this.column = column;
      this.hasRollover = (column == rolloverColumn);
      if (skin == null || skin.getContentMargin() == null) {
        skin = XPStyle.getXP().getSkin(header, "header.headeritem");
      }
      setText((value == null) ? "" : value.toString());
      setBorder(new EmptyBorder(skin.getContentMargin()));

      return this;
    }
  protected MouseInputListener createMouseInputListener() {
    if (XPStyle.getXP() != null) {
      return new MouseInputHandler() {
        public void mouseMoved(MouseEvent e) {
          super.mouseMoved(e);
          updateRolloverColumn(e);
        }

        public void mouseEntered(MouseEvent e) {
          super.mouseEntered(e);
          updateRolloverColumn(e);
        }

        public void mouseExited(MouseEvent e) {
          super.mouseExited(e);
          rolloverColumn = -1;
          header.repaint();
        }

        public void mousePressed(MouseEvent e) {
          super.mousePressed(e);
          if (header.getReorderingAllowed()) {
            rolloverColumn = -1;
            header.repaint();
          }
        }

        public void mouseDragged(MouseEvent e) {
          super.mouseDragged(e);
          updateRolloverColumn(e);
        }

        public void mouseReleased(MouseEvent e) {
          super.mouseReleased(e);
          updateRolloverColumn(e);
        }
      };
    } else {
      return super.createMouseInputListener();
    }
  }