Package org.jmule.ui.swing.tables

Examples of org.jmule.ui.swing.tables.JMTableCellRenderer


     //
     ////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());
View Full Code Here

TOP

Related Classes of org.jmule.ui.swing.tables.JMTableCellRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.