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

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

/* Copyright by Barry G. Becker, 2017. 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
  */
class BasicCellRenderer() extends DefaultTableCellRenderer {

  override protected def setValue(value: Any): Unit = {
    super.setValue(value)
    this.setToolTipText(if (value == null) ""
    else value.toString)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy