//
////table.getColumnModel().getColumn(0).setCellEditor(new TableCellEditor() {
//
//});
//table.getColumnModel().getColumn(0).setPreferredWidth(50);
table.getColumnModel().getColumn(0).setCellRenderer(new JMTableCellRenderer() {
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setText(value.toString());
this.setToolTipText(value.toString());
return this;
}
});
table.getColumnModel().getColumn(1).setCellRenderer(new JMTableCellRenderer() {
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.RIGHT);
this.setText(FileFormatter.formatFileSize(Integer.parseInt(value.toString()))+" ");
return this;
}
});
table.getColumnModel().getColumn(2).setCellRenderer(new JMTableCellRenderer() {
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setText(value.toString());