All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.barrybecker4.ui.table.BasicCellRenderer Maven / Gradle / Ivy

// Copyright by Barry G. Becker, 2012. Licensed under MIT License: http://www.opensource.org/licenses/MIT
package com.barrybecker4.ui.table;

import javax.swing.table.DefaultTableCellRenderer;

/**
 * Renders a cell in a table that has a tooltip
 * @see ColorCellEditor
 *
 * @author Barry Becker
 */
public class BasicCellRenderer extends DefaultTableCellRenderer {


    public BasicCellRenderer() {}

    /**
     * {@inheritDoc}
     */
    @Override
    protected void setValue(Object value) {
        super.setValue(value);
        this.setToolTipText((value == null) ? "" : value.toString());
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy