|
|
|
@ -16,9 +16,11 @@ import com.fr.general.DateUtils;
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.DefaultCellEditor; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JTable; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import javax.swing.event.TableModelEvent; |
|
|
|
|
import javax.swing.event.TableModelListener; |
|
|
|
|
import javax.swing.table.AbstractTableModel; |
|
|
|
@ -350,10 +352,12 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
|
|
|
|
|
private class CellRenderer extends DefaultTableCellRenderer { |
|
|
|
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { |
|
|
|
|
if (column == 0) { |
|
|
|
|
setBackground(new Color(229, 229, 229)); |
|
|
|
|
setHorizontalAlignment(CENTER); |
|
|
|
|
} |
|
|
|
|
return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); |
|
|
|
|
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); |
|
|
|
|
//居中文本不需要设置 borderInsets
|
|
|
|
|
setBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor"))); |
|
|
|
|
return component; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|