View Javadoc

1   package nl.tudelft.simulation.introspection.mapping;
2   
3   import java.awt.Component;
4   
5   import javax.swing.JComponent;
6   import javax.swing.JTable;
7   import javax.swing.table.TableCellRenderer;
8   
9   
10  /***
11   * A renderer for Swing components
12   * <p>
13   * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
14   * University of Technology </a>, the Netherlands. <br>
15   * See for project information <a
16   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
17   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
18   * License (GPL) </a>, no warranty <br>
19   * 
20   * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
21   *         Jacobs </a>
22   * @version 1.2 Apr 15, 2004
23   * @since 1.4
24   */
25  public class SwingCellRenderer implements TableCellRenderer
26  {
27  	/***
28  	 * @see javax.swing.table.TableCellRenderer#getTableCellRendererComponent(JTable,
29  	 *      Object, boolean, boolean, int, int)
30  	 */
31  	public Component getTableCellRendererComponent(final JTable table,
32  			final Object value, final boolean isSelected,
33  			final boolean hasFocus, final int row, final int column)
34  	{
35  		return (JComponent) value;
36  	}
37  }