139 |
public void installUI(JComponent c) |
public void installUI(JComponent c) |
140 |
{ |
{ |
141 |
header = (JTableHeader) c; |
header = (JTableHeader) c; |
142 |
|
rendererPane = new CellRendererPane(); |
143 |
installDefaults(); |
installDefaults(); |
144 |
installKeyboardActions(); |
installKeyboardActions(); |
145 |
installListeners(); |
installListeners(); |
195 |
false, // isSelected |
false, // isSelected |
196 |
false, // isFocused |
false, // isFocused |
197 |
-1, i); |
-1, i); |
198 |
|
// FIXME: The following settings should be performed in |
199 |
|
// rend.getTableCellRendererComponent(). |
200 |
comp.setFont(header.getFont()); |
comp.setFont(header.getFont()); |
201 |
comp.setBackground(header.getBackground()); |
comp.setBackground(header.getBackground()); |
202 |
comp.setForeground(header.getForeground()); |
comp.setForeground(header.getForeground()); |
203 |
if (comp instanceof JComponent) |
if (comp instanceof JComponent) |
204 |
((JComponent)comp).setBorder(cellBorder); |
((JComponent)comp).setBorder(cellBorder); |
205 |
gfx.translate(bounds.x, bounds.y); |
rendererPane.paintComponent(gfx, comp, header, bounds.x, bounds.y, |
206 |
gfx.setClip(0, 0, bounds.width, bounds.height); |
bounds.width, bounds.height); |
|
comp.setSize(bounds.width, bounds.height); |
|
|
comp.setLocation(0,0); |
|
|
comp.paint(gfx); |
|
|
gfx.translate(-bounds.x, -bounds.y); |
|
|
gfx.setClip(oldClip); |
|
207 |
} |
} |
208 |
} |
} |
209 |
|
|