



/* Genomic Comparison Tool
   Master Thesis of computer science

   Author: Yue Lu
   Version: 1.1

*/

//the tableCellRenderer for the ColorShape table

import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;

public class ColorTableCellRenderer implements TableCellRenderer
{
	// the abtract method that need to implement
       	public Component getTableCellRendererComponent(JTable table,
      Object value, boolean isSelected, boolean hasFocus,
      int row, int column)
   {
	   //set the color to the panel and return the panel
    System.out.println("Inside ColorTableCellRenderer's constructor, where it is calling getTableCellRendererComponent");
     ColorPanel.setBackground((Color)value);
    // System.out.println("This is the color being set......." + (String)value);
      return ColorPanel;
   }


   private JPanel ColorPanel = new JPanel();
}
