2006-05-23 Audrius Meskauskas <[EMAIL PROTECTED]>
PR 27680
* javax/swing/JTable.java (BooleanCellRenderer, IconCellRenderer):
Set horizontal alignment to centered.
Index: JTable.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/JTable.java,v
retrieving revision 1.106
diff -u -r1.106 JTable.java
--- JTable.java 22 May 2006 10:18:05 -0000 1.106
+++ JTable.java 23 May 2006 10:27:05 -0000
@@ -1045,7 +1045,17 @@
/**
* The CheckBox that is used for rendering.
*/
- private final JCheckBox checkBox = new JCheckBox();
+ private final JCheckBox checkBox;
+
+ /**
+ * Creates a new checkbox based boolean cell renderer. The checkbox is
+ * centered by default.
+ */
+ BooleanCellRenderer()
+ {
+ checkBox = new JCheckBox();
+ checkBox.setHorizontalAlignment(SwingConstants.CENTER);
+ }
/**
* Get the check box.
@@ -1251,6 +1261,12 @@
private class IconCellRenderer
extends DefaultTableCellRenderer
{
+ IconCellRenderer()
+ {
+ setHorizontalAlignment(SwingConstants.CENTER);
+ }
+
+
/**
* Returns the component that is used for rendering the value.
*