///////////////////////////////////////////////////////////////////////////////
//                   ALL STUDENTS COMPLETE THESE SECTIONS
// Title:            Satisfiability Test
// Files:            ABMatrix.java, CdbTuple.java, Dialog1.java, Frame1.java,
//                   JTableHeaderToolTips.java, Mytest.java, RowNumberHeader.java
// Semester:         Spring 2007
//
// Author:           Hang Yue, yuehang366@gmail.com
// CS Login:         hyue
// Lecturer's Name:  Dr.Peter Revesz
// Lab Section:      (your lab section number)
//
//                   PAIR PROGRAMMERS COMPLETE THIS SECTION
// Pair Partner:     (name of your pair programming partner)
// CS Login:         (partner's login name)
// Lecturer's Name:  (name of your partner's lecturer)
// Lab Section:      (your partner's lab section number)
//
//                   STUDENTS WHO GET HELP FROM ANYONE OTHER THAN THEIR PARTNER
// Credits:          Scot Anderson
//////////////////////////// 80 columns wide //////////////////////////////////
package satisfiablitytest;

import java.awt.event.MouseEvent;
import java.io.Serializable;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumnModel;


class JTableHeaderToolTips extends JTableHeader implements Serializable
{
	/**
	 * for Serializable interface
	 */
	 private static final long serialVersionUID = 5334532903567890867L;
	 /**
  	 * insert the header including column no. into table by transfering toolTips'string values to Dialog1 class
  	 */
      protected String toolTips[];
      
     public void setToolTips(String tips[])
     {
          toolTips = tips;
     }

     public String getToolTipText(MouseEvent event)
     {
          String tip = super.getToolTipText(event);
          int column = columnAtPoint(event.getPoint());
          if(toolTips != null && column < toolTips.length && toolTips[column] != null)
               tip = toolTips[column];
          return tip;
     }

     public JTableHeaderToolTips(TableColumnModel tcm)
     {
          super(tcm);
     }
}
