1
2
3
4
5
6
7
8 package hoplugins.trainingExperience.ui.renderer;
9
10 import hoplugins.trainingExperience.ui.bar.VerticalIndicator;
11
12 import java.awt.Component;
13
14 import javax.swing.JTable;
15 import javax.swing.table.DefaultTableCellRenderer;
16
17
18 /***
19 * DOCUMENT ME!
20 *
21 * @author Mirtillo To change the template for this generated type comment go to
22 * Window>Preferences>Java>Code Generation>Code and Comments
23 */
24 public class OutputTableRenderer extends DefaultTableCellRenderer {
25
26
27
28
29
30 public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
31 boolean hasFocus, int row, int column) {
32 Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus,
33 row, column);
34
35 if ((column > 2) && (column < 11)) {
36 VerticalIndicator vi = (VerticalIndicator) value;
37
38
39 vi.setBackground(cell.getBackground());
40 vi.setOpaque(true);
41
42 return vi;
43 }
44
45 return cell;
46 }
47 }