KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > usertasks > renderers > LineTableCellRenderer


1 package org.netbeans.modules.tasklist.usertasks.renderers;
2
3 import javax.swing.table.DefaultTableCellRenderer JavaDoc;
4
5 /**
6  * Cell renderer for line numbers
7  */

8 public class LineTableCellRenderer extends DefaultTableCellRenderer JavaDoc {
9     @Override JavaDoc
10     protected void setValue(Object JavaDoc value) {
11         if (value == null)
12             return;
13         int n = ((Integer JavaDoc) value).intValue();
14         if (n == 0)
15             setText(""); // NOI18N
16
else
17             setText(Integer.toString(n));
18     }
19 }
20
Popular Tags