Methods Summary |
---|
protected javax.swing.event.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();
}
|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent h)
return new WindowsTableHeaderUI();
|
public void | installUI(javax.swing.JComponent c)
super.installUI(c);
if (XPStyle.getXP() != null) {
originalHeaderRenderer = header.getDefaultRenderer();
if (originalHeaderRenderer instanceof UIResource) {
header.setDefaultRenderer(new XPDefaultRenderer());
}
}
|
public void | uninstallUI(javax.swing.JComponent c)
if (header.getDefaultRenderer() instanceof XPDefaultRenderer) {
header.setDefaultRenderer(originalHeaderRenderer);
}
super.uninstallUI(c);
|
private void | updateRolloverColumn(java.awt.event.MouseEvent e)
if (header.getDraggedColumn() == null &&
header.contains(e.getPoint())) {
int col = header.columnAtPoint(e.getPoint());
if (col != rolloverColumn) {
rolloverColumn = col;
header.repaint();
}
}
|