*** empty log message ***
[thera-pi-2.git] / RehaSql / src / rehaSql / IntTableCellRenderer.java
blob203fd7ae1262a03cc097904f519c14201e2568d2
1 package rehaSql;
3 import java.awt.Component;
5 import javax.swing.JTable;
6 import javax.swing.table.DefaultTableCellRenderer;
8 public class IntTableCellRenderer extends DefaultTableCellRenderer
11 /**
14 private static final long serialVersionUID = 1L;
15 /**
18 //DecimalFormat dform = new DecimalFormat("####0.00");
19 public Component getTableCellRendererComponent(final JTable table, final
20 Object value,boolean isSelected,boolean hasFocus,int row,int column){
21 super.getTableCellRendererComponent(table, value, isSelected, hasFocus,row, column);
22 setHorizontalAlignment(javax.swing.SwingConstants. RIGHT);
23 if(value instanceof Integer){
24 if(value==null){
25 setText(null);
26 }else{
27 setText(Integer.toString((Integer)value));
29 }else{
30 if(value==null){
31 setText(null);
32 }else{
33 setText(value.toString());
36 return this;