Revision 22758 branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/swing/cellrenderers/BooleanTableCellRenderer.java
BooleanTableCellRenderer.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package org.gvsig.gui.beans.swing.cellrenderers; |
42 | 42 |
|
43 |
import java.awt.BorderLayout; |
|
43 | 44 |
import java.awt.Component; |
44 |
import java.awt.FlowLayout; |
|
45 |
import java.awt.Dimension; |
|
46 |
import java.awt.LayoutManager; |
|
45 | 47 |
|
46 | 48 |
import javax.swing.BorderFactory; |
47 | 49 |
import javax.swing.JCheckBox; |
... | ... | |
50 | 52 |
import javax.swing.border.MatteBorder; |
51 | 53 |
import javax.swing.table.DefaultTableCellRenderer; |
52 | 54 |
|
55 |
import org.jfree.layout.CenterLayout; |
|
56 |
|
|
53 | 57 |
/** |
54 | 58 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
55 | 59 |
*/ |
... | ... | |
96 | 100 |
} |
97 | 101 |
try { |
98 | 102 |
Boolean v = (Boolean) value; |
99 |
JPanel content = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
|
103 |
JPanel content = new JPanel(new CenterLayout());
|
|
100 | 104 |
content.setBackground(table.getBackground()); |
101 | 105 |
chk = new JCheckBox("", v.booleanValue()); |
102 | 106 |
chk.setBackground(table.getBackground()); |
103 |
content.add(chk); |
|
107 |
content.add(chk, BorderLayout.CENTER);
|
|
104 | 108 |
return content; |
105 | 109 |
} catch (ClassCastException ccEx) { |
106 | 110 |
throw new RuntimeException("Trying to use a Boolean cell renderer with a non-Boolean datatype"); |
Also available in: Unified diff